In debugging some apps, it seems like sometimes lambdas may be hanging indefinitely until the timeout expires.
This causes the action to fail, even if all the app code has completed.
Debugging further it looks like it's possible that when processing larger datasets, some open connections will be kept open and block the event loop from clearing.
This heuristic is something we can add from Lambda
https://docs.aws.amazon.com/lambda/latest/dg/nodejs-context.html
the gist is, if we set context.callbackWaitsForEmptyEventLoop = false; then once the callback is called, we exit, despite having other connections
In debugging some apps, it seems like sometimes lambdas may be hanging indefinitely until the timeout expires. This causes the action to fail, even if all the app code has completed. Debugging further it looks like it's possible that when processing larger datasets, some open connections will be kept open and block the event loop from clearing.
This heuristic is something we can add from Lambda https://docs.aws.amazon.com/lambda/latest/dg/nodejs-context.html the gist is, if we set
context.callbackWaitsForEmptyEventLoop = false;
then once the callback is called, we exit, despite having other connectionshttps://zapierorg.atlassian.net/browse/PDE-5490