1

I have a problem with execution time of php script as said above.

Script turning on from web browser. It's heavy, so it's execution time can take up to 5 minutes or even more.

What i've done already:

  1. set_time_limit(0); - doesnt help
  2. changed max_execution_time in php.ini - no effect
  3. changed Timeout in apache - no effect
  4. ignore_user_abort(true) - doesn't help

All variables were set to 1 hour, and still i getting disconect in 2 minutes. Browser said something like "Data is not obtained". I know that i'm missing something, but don't know what.

Thanks in any advance.

ineersa
  • 3,445
  • 30
  • 40
  • did you restarted apache after these changes? –  Sep 04 '13 at 07:04
  • Your browser timeout causes this message. Try to send some content before executing your heavy script. – Edd Sep 04 '13 at 07:04
  • yes restarted. How to check browser timeout? – ineersa Sep 04 '13 at 07:05
  • 2
    If you're running such a heavy script, you're better queueing it to a back-end system that can process in its own time and simply sending an immediate response to the browser saying that it's being processed, and possibly an automated response again when the back-end processing is complete - don't run long tasks directly from a browser – Mark Baker Sep 04 '13 at 07:09
  • See this answer: http://stackoverflow.com/questions/5798707/browser-timeouts?answertab=votes#tab-top – Edd Sep 04 '13 at 07:09
  • It's not ajax call. I know that console commands are supposed to do heavy tasks, but this must be done like this. – ineersa Sep 04 '13 at 07:14
  • If you use easyPhp or another all in one server, there is multiple php.ini file and htaccess files. Maybe you didn't modify the good one. – Chopchop Sep 04 '13 at 07:17
  • Nope it's done on Amazon with apache+php+mysql. – ineersa Sep 04 '13 at 07:19
  • Caused by Amazon ELB. Thanks to all. – ineersa Sep 04 '13 at 09:25

0 Answers0