max_execution_time not working #1811
Replies: 5 comments 1 reply
-
Just a quick search gave me this have you configured cloudfront at some point? |
Beta Was this translation helpful? Give feedback.
-
Beta Was this translation helpful? Give feedback.
-
Wait are you using API gateway? That cannot work then, API gateway doesn't allow that. Please post all the details of your stack so that we can save some time. |
Beta Was this translation helpful? Give feedback.
-
Thank you Matthieu for your help. It’s a simple serverless Symfony application that you’re brilliantly help us to host on AWS. Everything works perfectly (assets, php scripts with db, users sessions...) except for scripts that take more than 30 seconds to execute. composer.json
serverless.yaml
SleepController.php
Maybe serverless-lift plugin causing the problem ? |
Beta Was this translation helpful? Give feedback.
-
As my knowledge, API Gateway for HTTP API has a hard limit of 30s12 that cannot be increased. So if your function runs for more than 30s, API Gateway will respond to CloudFront with a timeout error, even if the function is still running in the background (idk really if the function is killed by API Gateway, I'll think not). Footnotes |
Beta Was this translation helpful? Give feedback.
-
Description:
Hi,
I’m working on a project using Bref and need to increase a default execution time of 30 seconds to 60 sec
Here are the steps I’ve taken so far:
1. I modified the serverless.yml file to set the timeout to 30 seconds.
2. Despite this, the execution time did not change as expected, so I then modified the php.ini file.
Currently, the execution can exceed 30 seconds, but I am encountering a CloudFront error if the execution time is between 30 and 60 secondes. Interestingly, the CloudWatch error "The request ***** timed out after 58992 ms. Note: that duration may be lower than the Lambda timeout...." that I was previously receiving has disappeared when the execution time is between 30 and 60 secondes evenif CloudFront return a error.
Execution over 60sec. This one is ok :
Could you please advise on what might be causing the CloudFront error and what further steps I might need to take to increase execution time ?
Thank you!
Beta Was this translation helpful? Give feedback.
All reactions