Reputation: 631
I am working on an HTTP based lambda function and have implemented an external lambda extension that collects and sends some telemetry data to external server. I have noticed that when lambda function completes the processing of a request, the runtime freezes until a new request is received. This happens even when my external extension has some work to do. Due to this behavior, I am observing send failures in lambda extension with error "context deadline exceeded".
Please note that the lambda function timeout is 3 seconds, but it completes the processing of request within 50 milliseconds, and then it pauses until the next request hits the lambda function.
There is nothing related to this behavior in AWS documentation.
I tried to add send retries but that doesn't solve the problem. Can someone please suggest why lambda behaves like that? If this 'pause' is correct behavior, then it can always be a problem with external extensions. How should we handle such cases in external extensions?
Upvotes: 0
Views: 179