-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
When slim_handler is used, there's no way to get binary libraries into the LD_LIBRARY_PATH #755
Comments
I think we'd need to do something like this in the handler: https://docs.python.org/2.7/library/ctypes.html The problem is knowing what to load. |
I think the general consensus after discussion in Slack is that certain file-types (.so) should be left in the main package so that they're in the right place for the rest. |
Are there any known workarounds for this at the moment? |
So it looks like the Note that order of imports is very important here. When loading a library X that depends on a library Y, make sure to load Y first. The current version of zappa provides very little feedback on failure -- Also this won't help if any of your python modules use I think this issue might have been solved by #789 |
This error isn't very helpful either "Failed to find library...right filename?" I'd rather get the original error or atleast a library or filename. |
I'm experiencing this issue trying to deploy a lambda function that uses pandas. I can't deploy without slim_handler because the unzipped size is too large, but pandas doesn't work when slim_handler is true. |
Similar issue, I think python Babel put my deployment over the limit. Just getting timeouts and "Failed to find library...right filename?". Any advice on how to proceed or even debug? |
I am having this same issue. Need to use slim_handler due to file size but shared libraries (.so files) are not being found. |
It seems I'm having the same problem while deploying chromedriver and headless-chromium, they just crash and have this error "Failed to find library...right filename?" before the crash. Has anyone figured out how to fix this? |
I am also having this issue. Surely this is an incredible oversight in the design of slim_handler? Is there any way around this at all? |
I wasn't able to solve this, @themmes |
Where do we go from here? This is clearly a long-standing issue and essentially removes all the usefulness of slim_handler. @geotob Have you had any more success with this? |
@ckyleda it's been too long since I last looked at it. From memory using the I think we also patched the library to return more useful debugging output than Line 117 in 4cf80b2
|
I set mine to the above locally. Thanks for the tip! |
Any workaround on this? |
@geotob Bit new to zappa - question about the include setting. I'm using If my virtualenv is at ~/.virtualenvs// Where do I need to put the libpq.so.5? |
Hello guys, My apollogies if I am overlooking something obvious but I had a similar issue with AWS Lambda service offers a feature called Layers. Basically it seems to be an option to use when large binary files (like shared libs) need to be available at runtime in the lambda function. A fork of Zappa by @jedestep supports "attaching" layers to your lambda setting a related option in your I am using Geodjano which requires quite a few geospatial libraries (.so files) to be available to django and uploading them in a layer which made them available through the I did not make much testing with |
I ran into a related issue setting up python3-saml on with the dependent In order to get lambda to load the dependencies I first set the |
I just wanted to add something that helped me solve my issues with binary libraries not getting referenced or missing during packaging.
I hope this helps someone out there. My problem stemmed out of |
Context
Normally, anything in the /lib directory will end up in
/var/task/lib
which Lambda includes onLD_LIBRARY_PATH
which lets code link to it.However, when
slim_handler
is in effect, the code lands up at/tmp/<projname>/lib
which isn't on LD_LIBRARY_PATH. You can't modify the path when running as the dynamic linker has already read the value, so changes have no effect.Expected Behavior
Either there should be a way to say "when building the slim_handler, include these libraries in
/lib
", or there should be a symlink in the slim_handler package to the "real" location in the project files on/tmp
Actual Behavior
You can't get binary libraries to work
Possible Fix
Steps to Reproduce
lib
subdirectorylib
slim_handler
totrue
lib
slim_handler
to falseYour Environment
zappa_settings.py
:The text was updated successfully, but these errors were encountered: