#18833 [NEW]: exec() : After throusands calls, causes "Unable to fork" error

From: Date: Fri, 09 Aug 2002 16:08:03 +0000
Subject: #18833 [NEW]: exec() : After throusands calls, causes "Unable to fork" error
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-16391@lists.php.net to get a copy of this message
From: antoine.bajolet@tdf.fr Operating system: GNU/Linux 2.4.9 RH 7.1 PHP version: 4.2.1 PHP Bug Type: *General Issues Bug description: exec() : After throusands calls, causes "Unable to fork" error Hello, I use php 4.2.1 as stand-alone binary to proceed batch file conversions with exec() and other utilites (ie mapserver, shapelib and others) The binary is compiled with postgresql and ming support. The amount of files to convert is over 10,000. Each file needs 8 (height) exec() to be converted. After lots of loops (throusands but it varies), i obtain the error message : <br /> <b>Warning</b>: Unable to fork [/usr/local/tdf/www/src/mapserver_3.5/shp2img -m /usr/local/tdf/www/src/swfs/temp.map -o /usr/local/tdf/www/src/swfs/13441_66.png -t -d base 13441] in <b>/usr/local/tdf/www/src/shape_to_tvview.php</b> on line <b>336</b><br /> [.../...] <br /> <b>Warning</b>: Unable to fork [/usr/local/tdf/www/src/ming-0.2a/util/png2dbl /usr/local/tdf/www/src/swfs/13441_66.png] in <b>/usr/local/tdf/www/src/shape_to_tvview.php</b> on line <b>25</b><br /> <br /> When i ran a #top in the same time, i saw that pid numbers of executed programs increases during execution of the script, and the exec did not reuse pid numbers already used in the same script if the loop is too quick (when the script converts small shapefiles). the highest number i saw was The total number of processes on the system was not over 71 in the same time. Any idea ? -- Edit bug report at http://bugs.php.net/?id=18833&edit=1 -- Fixed in CVS: http://bugs.php.net/fix.php?id=18833&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=18833&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=18833&r=needtrace Try newer version: http://bugs.php.net/fix.php?id=18833&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=18833&r=support Expected behavior: http://bugs.php.net/fix.php?id=18833&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=18833&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=18833&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=18833&r=globals

« previous php.bugs (#16391) next »