NYCPHP Meetup

NYPHP.org

[nycphp-talk] Timing out in php batch

Eric Gewirtz egewirtz at suscom.net
Tue Jun 14 15:40:24 EDT 2005


We are having a time out issue running in php batch mode. It was my
understanding based on the php manual that the max_execution_time
parameter in php.ini is overridden by batch and set to unlimited, yet
our application is getting the following error.

 

<b>Fatal error</b>:  Maximum execution time of 30 seconds exceeded in
<b>/home/abc/def_html/xxxxxxx/p2/prod/prodscript.php</b> on line
<b>315</b><br />

 

The process is a database OLTP oriented application so we are
'selecting' from a MySQL DB and we are you using mysqlimport to load
tables as well as insert / update / and delete processing using PEAR DB.
The process usually runs for about 45 minutes but when the machine has
other processing going on it could take up to 2 hours and occasionally
it times out :-(

 

In this particular case the code was reading a 400,000 plus record flat
ascii file to get a record count (I know we could have used 'wc -l' but
we are trying to do everything in php so we are platform and OS
independent). While this was going on another process was applying about
4.5 million transactions to database tables.

 

We have been running this code for almost a year and we do get this
error when we run a lot of scripts on the server at the same time. This
time the error message identified a specific line of code that caused
the time out but this is not consistent - it times out within other
areas of the code too.

 

Our hosted server is dedicated to us - it is a dual processor (2ghz) - 2
gig memory

The following is the output of 'uname -a' from the server ---> Linux
xxxxxxx.xxxxxxx.com 2.4.30 #2 SMP Thu May 19 12:34:10 CDT 2005 i686 i686
i386 GNU/Linux

We are running php version 4.3.10

 

Any help would be appreciated - thanks

 

 

Eric Gewirtz

SolutionOne

Phone - 845-729-7800

Fax     - 845-279-5502

egewirtz at rcn.com

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.nyphp.org/pipermail/talk/attachments/20050614/b27dc8a0/attachment.html>


More information about the talk mailing list