Connection timeout doesn't seem to be working
brettdh opened this issue · 1 comments
I accidentally deployed the warmup lambda into a subnet without internet access. As you'd expect, the warmup lambda was unable to invoke my functions. However...
Based on this section of the README and the resolution of this issue, I thought that the warmup function's attempts to connect would time out quickly if it couldn't talk to the Lambda API, but instead, it showed no such errors; instead, the warmup lambda itself timed out after the configured timeout.
Additionally, no error at all appeared in the prewarming logs for either serverless deploy
or serverless prewarm
; instead, I get
WarmUp: Warmer "dev" successfully prewarmed your functions.
even though the functions were not warmed, and the warmup lambda did not complete successfully.
Since I've found the root cause of my issue (using the wrong subnet for the warmup lambda), I think I'm unblocked (assuming I can figure out how to configure the right subnet on the warmup lambda), but I did want to raise this issue, as it masked the real problem for a bit.
Hi @brettdh ,
Indeed, if you deployed to a network with no internet access you need to also set up NAT as documented in the section that you highlighted.
Looking at the code, the default timeout is 10 seconds which seems an inconsistency with the documentation.
I'll fix it.
It's strange that you don't see the timeout error during pre-warm.
So this sounds like a bug.