-
Notifications
You must be signed in to change notification settings - Fork 468
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
SNOW-143578: Unable to use on AWS Lambda #287
Comments
Hello @valkolovos . I have the same problem and also tried changing the version of the package, but it did not work either: https://community.snowflake.com/s/article/Python-connector-2-0-0-incompatible-with-AWS-Lambda |
Hey, I'm seeing the same issue as @valkolovos and @Jopepato. Any idea when this will be resolved or if there is an older version of the connector we can go back to? |
Please note that version >=2.0.0 is not compatible for a different reason. You should not mix the 2 issues up (however the next release will have this unrelated problem fixed). I will look into what's wrong with multiprocessing on AWS lambda |
Hi @keller00 , we are experiencing the same problem and we would like to use python connector in Lambda. Any estimate when the solution could be available? |
There's no estimate as of now. The thing is that we don't use multiprocessing pool directly. We use a |
Hey @keller00 , Is there any update? |
@keller00 Take a look at #304 and see if it's okay. I added code to fall back to a thread-based pool instead of a process-based pool if the process pool is broken, but in fact, the process pool is used in only two places and not used that heavily. It would be easy to replace multiprocessing.pool.ThreadPool with concurrent.futures.ThreadPoolExecutor, but there are differences between process and thread pools in terms of shared memory, and the behavior of the ThreadPoolExecutor is slightly difference from ThreadPool as it doesn't implement the terminate method. In any case, for my use case, with the patch in #304, I am able to do my work with lambda. The patch is relative to master, which at this moment, is also 2.2.5. |
Hi @keller00 , any update? we have the same issue. tried many versions 1.9.1, 2.0.0, and above. |
I merged my fix for this issue, if everything goes well then this will be included in the next release. |
@sfc-gh-mkeller What will the version number of the release with the fix be? |
and will a comment be made here when it is released, or if not, is there a way to be notified? Thanks. |
I think so far it's
Sure, I can let you know! |
But anyone can subscribe notification about releases through this site for free: https://libraries.io/pypi/snowflake-connector-python |
I see 2.2.7 is out and includes the changes. I've redeployed my lambda functions with 2.2.7 and without my patch and will monitor it for a few hours. Thanks! |
Running for several hours with zero errors. :-) |
That is great to hear! Thanks again for you help with this @jberkenbilt ! |
Please answer these questions before submitting your issue. Thanks!
What version of Python are you using (
python --version
)? 3.8What operating system and processor architecture are you using (
python -c 'import platform; print(platform.platform())'
)? AWS Lambda Python3.8 runtimeWhat are the component versions in the environment (
pip list
)?What did you do?
Created a lambda. Tried to execute SQL using snowflake connector (created connector, got cursor from connector, executed SQL).
What did you expect to see? Results of SQL query
What did you see instead?
Problem appears to be lack of support for
multiprocessing.Pool
in AWS Lambda execution environment - see https://blog.ruanbekker.com/blog/2019/02/19/parallel-processing-on-aws-lambda-with-python-using-multiprocessing/The text was updated successfully, but these errors were encountered: