问题:
我有一个python lambda,它每秒不断接收数据并将其放入DynamoDB中。我注意到,在DynamoDB第一次花费更多时间并且该函数超时之后,以下所有调用也都超时了,并且永远都无法恢复。使lambda恢复正常的方法是重新部署它。开始超时时,它不会显示任何日志。它在不执行任何代码的情况下超时。
下面是代表问题的控制台图片。
为了使用此功能更快地重现问题,我做了以下工作:
Is there a way to resolve this issue without having to redeploy?
I have seen the same description of issue but with nodejs in this post: https://forums.aws.amazon.com/thread.jspa?threadID=234417.
I haven't seen any description related with the python lambda env
More information about the setup:
Lambda environments tested: python3.6 and python3.7
Tool to deploy lambda: serverless 1.57.0
serverless plugins used: serverless-python-requirements, serverless-wsgi
我没有为lambda使用任何VPC
感谢您的帮助,
找出该错误的触发器。如果上载的lambda函数zip太大,则第一次超时后就无法恢复!
我的解决方案是仔细剔除不必要的依赖关系,以使程序包更小。
我使用docker容器创建了一个存储库,以便人们更轻松地重现该问题:
https://github.com/pedrohbtp/bug-aws-lambda-infinite-timeout
感谢您在评论中的消息。我感谢谁花时间尝试在SO中提供帮助。
本文收集自互联网,转载请注明来源。
如有侵权,请联系 [email protected] 删除。
我来说两句