ID: 27486 User updated by: donny at intercosmos dot com Reported By: donny at intercosmos dot com -Status: Feedback +Status: Open Bug Type: CGI related Operating System: Linux 2.6.2 /Fedora Core 1, PHP Version: 4.3.4 New Comment:
Quick explanation. 1. Parent Program, grabs a list of 25 domains, and then spawns off 25 children to process the domain. The parent does a mysql get lock on the domain, and once the child process is done, it tells mysql to release the lock which tells the parent the child is finished. Once all 25 domains are finished the parent spawns a new instance of itself and the original parent exits. 2. The child programs in certain cases can spawn children of their own, but never more than 1 or 2 children. This keeps the code small and effecient. Hope this makes sense. Previous Comments: ------------------------------------------------------------------------ [2004-03-04 03:29:16] [EMAIL PROTECTED] What does that new program that spawns these children do? Is it a long living process? ------------------------------------------------------------------------ [2004-03-03 18:35:31] donny at intercosmos dot com Description: ------------ We started using a new program that spawns additional CLI php scripts recently. And today, we started getting stuff like this: PHP Warning: system(): Unable to fork [/usr/bin/php /www/htdocs/onetime/spawn_domain.php 'businesslicensing.com' > /dev/null &] in /www/htdocs/onetime/spawn_domain_parent.php on line 39 Now if I wait a few minutes, and restart the parent it will normally go on about it's business. But then after a while it will all of a sudden no longer be able to spawn new children. All of the other bugs mentioned like this are based on Windows, but this is a Linux box. Reproduce code: --------------- system("/usr/bin/php /www/htdocs/onetime/spawn_domain.php '$db[domain]' > /dev/null &"); Expected result: ---------------- It should spawn a child CLI program and run. Actual result: -------------- It runs the code mentioned above. ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=27486&edit=1