views:

37

answers:

1

After my host enabled suPHP, a previously working script has been timing out after ~3min (it varies, but the script has not run for more then 3, AFAIK).
The odd part is, the script is not throwing any errors that I can see (and yes, full PHP error reporting/logging is enabled and all MYSQL queries have been checked for errors, also) it simply stops. Refreshing the page will load more of the data the script is supposed to process (probably because the MYSQL queries have been cached...), but if there is a lot of data to process it never fully executes. The other oddity is that I can run test scripts for over 10 minutes on the same host w/ set_time_limit(0); / etc.

Anyone else had to deal with this, or know what is causing the timeout and how to fix it (assuming that dropping suPHP is not an option). There was also a simultaneous update from PHP 5.2.x to 5.3.x, but I doubt that is causing the issue. :/

A: 

I've seen this happen when memory runs out - the script just ends without error. If you have a loop, try using the memory functions to dump the memory status. Also, use phpinfo() to see what your maximum memory allowance is - the switch to suPHP may have changed that to your detriment.

Nice idea, but the script it written pretty well so it uses memory pretty consistently. The usage never went above 6.7MB which is about 1/10 the limit, and it was using less memory then the peak usage when it crashed. :(
phpwns
How about checking the server logs for segfaults?
Interesting thought, never found any of those in the error logs I can access though. Fortunately suPHP is gone now, so this is no longer an issue.I was able to narrow it down to suPHP timing out based on MYSQL activity, though I'm not sure exactly what (e.g. query limit, overall MYSQL time per-script, or a per-query time limit etc.). :/
phpwns