JumpCloud Serverlesss Lambda Function timeout error
Hello Giks,
Hope all doing good. I'm facing issue while running a serverless application Lambda function. I used this application to download files from remote node and store it to S3 bucket. it was working fine previously, all of sudden it stop fetching files source location. while debugging issue I observe that it was a lot of time complete a test event. In the CloudWatch logs I'm getting below error logs.
***START RequestId: 052226a9-5344-45f1-88bf-5c00242baee0 Version: $LATEST END RequestId: 052226a9-5344-45f1-88bf-5c00242baee0
REPORT RequestId: 052226a9-5344-45f1-88bf-5c00242baee0 Duration: 180625.18 ms Billed Duration: 180000 ms Memory Size: 192 MB Max Memory Used: 193 MB Init Duration: 587.37 ms
XRAY TraceId: 1-626104fb-16ae94a33273f6404d180e41 SegmentId: 1010be2c3227cfab Sampled: true
REPORT RequestId: 052226a9-5344-45f1-88bf-5c00242baee0 Duration: 180625.18 ms Billed Duration: 180000 ms Memory Size: 192 MB Max Memory Used: 193 MB Init Duration: 587.37 ms XRAY TraceId: 1-626104fb-16ae94a33273f6404d180e41 SegmentId: 1010be2c3227cfab Sampled: true
2022-04-21T07:20:17.417Z 052226a9-5344-45f1-88bf-5c00242baee0 Task timed out after 180.63 seconds***
I have tried increasing memory and timeout parameter but still getting same error. In X-Ray Trace Logs getting below response.
serverlessrepo-JumpCloud--DirectoryInsightsFunctio-fgqp218AtLpYAWS::Lambda serverlessrepo-JumpCloud--DirectoryInsightsFunctio-fgqp218AtLpY OK 202 17ms Dwell Time
OK
47ms Attempt #1 Error (4xx) 200 3.03min Attempt #2 Error (4xx) 200 3.00min Attempt #3 Error (4xx) 200 3.00min
serverlessrepo-JumpCloud--DirectoryInsightsFunctio-fgqp218AtLpYAWS::Lambda::Function serverlessrepo-JumpCloud--DirectoryInsightsFunctio-fgqp218AtLpY
Error (4xx)
3.01min Initialization
OK
587ms Invocation
Error (4xx)
3.01min serverlessrepo-JumpCloud--DirectoryInsightsFunctio-fgqp218AtLpY
Error (4xx)
3.00min Initialization
OK
611ms Invocation
Error (4xx)
3.00min serverlessrepo-JumpCloud--DirectoryInsightsFunctio-fgqp218AtLpY
Error (4xx)
3.00min Initialization
OK
549ms Invocation
Error (4xx)
3.00min
Can anyone advise if anything I missed to debug.
Thanks, Aman
As you can see in the logs you shared, the Lambda functioned timed out: Task timed out after 180.63 seconds
.
I don't have enough information to tell you why it did. Good news is that there is a troubleshooting guide which you can use to identify the issue and then fix it.
Hope this helps.
If something is suddenly taking three minutes to complete (when it didn't before) and there is a "remote node" involve I would suspect something network-wise as the problem. DNS. Reachability. Firewalls at the far end. Something.
I'm something of a Luddite here but if it were me I'd be putting debug statements with timestamps at every step of the way within the code and figuring out what is going on. Brute force: yes. Elegant: no. Good at figuring out the problem? Absolutely.
Relevant questions
Scheduling local lambda function
asked a year agoCanary Deployments for Lambda using CodeDeploy with CodePipeline
asked 4 months agoHow to export environment variables from a Lambda function.
asked 21 days agoAWS Translate sometimes gets an error TCP timeout on Lambda function
asked 3 months agoInconsistent "The Lambda Function Returned An Error."
asked 2 years agoV2 Lex OrderFlowers Blueprint Lambda Error
asked 16 days agoscript to update python runtime from 3.6 to 3.9 in lambda functions
Accepted Answerasked 6 days agoApiGateway has 500 error when Lambda is updating
Accepted Answerasked 4 months agoJumpCloud Serverlesss Lambda Function timeout error
asked a month agoUnable to determine handler from trigger event
asked 4 months ago