AWS ec2 instance with php and mysql

0

I am running a php script which fetches through multiple curl requests and updates my database, i have a problem in which due to network delay and delayed responses, the page is timing out and i am getting the gateway timeout error. I have changed the php.ini file and the max_execution time is set to 600 seconds, still the page is timing out in less than 60 seconds

Rahil
feita há 8 meses230 visualizações
1 Resposta
0

Hi,

Increasing max execution time at PHP level won't solve your problem. Your current timeout comes from API Gateway: after 30s, it declares your PHP script unresponsive and returns a timeout to the user.

See https://docs.aws.amazon.com/apigateway/latest/developerguide/limits.html

Maximum integration timeout 30 seconds No

So, your script must respond in less than 30s to avoid this timeout response.

If you can't reduce processing time, you have to change your implementation a bit: run the script in the first request, which return a request id. and then have additional poll requests (initiated by client) supplying the request id to check if completed.

Best,

Didier

profile pictureAWS
ESPECIALISTA
respondido há 8 meses

Você não está conectado. Fazer login para postar uma resposta.

Uma boa resposta responde claramente à pergunta, dá feedback construtivo e incentiva o crescimento profissional de quem perguntou.

Diretrizes para responder a perguntas