سؤال

We have a PHP backend which connects over an API to our Java backend for some heavy duty number crunching. Unfortunately this number crunching sometimes takes longer than 1 minute, and the AWS load balancer times out.

Do you know of a way to prevent this?

I was thinking getting PHP to keep pinging, or JQuery to keep pinging, or increasing the timeout of the load balancer, but I haven't been able to any of those.

هل كانت مفيدة؟

المحلول

By default, the ELB will timeout if no data is received for 1 minute.

Ideally this would be designed as a job, and you would just send status reports with ajax. If you can't do that, there are a couple of other options.

Send data, even if its just empty spaces. Keep in mind that php may use output buffering, and may not send any data unless the packet is of at least a certian size.

Contact AWS support to have the timeout for your ELB increased.

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top