Error 324 - php script timing out?


#1

Hello,

I’ve gone through quite a few wiki pages and support threads to see where I may be able to find a solution to my issue, however, it has been to no avail.

The issue here is I have a script that will perform the following items:

1 - save the DB via exec mysqldump (sometimes they can get up to 800mb)
2 - run through some fairly extensive scripts to update player skills, etc (I run a hockey simulator).

We’ve recently moved over due to mysql time-out issues at our previous host. So far we were not getting these issues until now.

I don’t know if it’s actually a mysql timeout or if its just the php script timing out, however, I can consistently get back a 324 error in my browser.

I have tried to change the max_execution_time by adding a file to /home/username/.php/5.3 called phprc with the max_execution_time = 600 (just to test) and have the same issue.

Is anyone else having a similar issue or can someone direct me towards figuring out another solution?

Thanks in advance,

James


#2

Time-intensive tasks should generally not be run through the web server — there’s just too many ways that can go wrong. Cron jobs aren’t subject to the same time limitations, and are probably a better choice for jobs like this.


#3

I can understand that point of view but the service we’re trying to deliver doesn’t really work by relying on a cron job to execute.

The user will specifically want to run this script as its time to do so for their league as the league will be changing to a new season. It would be akin to taking a ticket and waiting for your order to be served because the person is on break. Not good.

At our previous host we were not running into this specific issue… the mysql processes itself were being killed and we never received a 324.

I’m trying to understand where this 324 is coming from? Does the server drop connection after 30 seconds of inactivity? is there something else going on?


#4

to update this, the script will now run for longer than 2 minutes, however, it will eventually return a Gateway timeout.

I have tried using:

ob_start();
echo str_pad(" “, 4096).”\n";
ob_flush();
flush();

… to no avail.

The browser remains on the submission screen while the script chugs away.

Using Chrome as my browser but will be trying IE and Firefox next to attempt to replicate the issue.

Any help is appreciated.[hr]
and I can replicate the issue with Internet Explorer 8 and Firefox 3. Flush does not work.

Is there perhaps a timeout on the apache side?


#5

as an update, I seem to no longer be getting error 324.

I am now getting 500 internal server errors or gateway timeouts.