Lambda Timing out after calling callback

前端 未结 2 633
夕颜
夕颜 2020-12-31 05:23

I\'m using two lambda functions with Javascript\'s 4.3 runtime. I run the first and it calls the second synchronously (sync is the intent). Problem is the second one times o

相关标签:
2条回答
  • 2020-12-31 05:44

    As Michael - sqlbot said; the issue seems to be that as long as there is an open connection, because of the non empty event loop, calling the callback doesn't terminate the function. Had the same problem with a open Redis connection; solution as stated is context.callbackWaitsForEmptyEventLoop = false;

    0 讨论(0)
  • 2020-12-31 06:00

    At least for redis conenctions it helps to quit the connection to redis in order to let Lambda finish the job properly.

    0 讨论(0)
提交回复
热议问题