On Wed, May 3, 2006 12:51 am, Oz wrote: > Richard Lynch wrote: > >>On Tue, May 2, 2006 11:29 am, Oz wrote: >> >>>My script dies with the following line (after a few hours running >>>without other errors/warnings/notices): >>>Fatal error: pcntl_fork(): Error 11 in /home/foo/bar.php on line 297 >>> >>>Is there any documentation for "pcntl_fork(): Error 11"? >>>Does anybody know what causes "pcntl_fork(): Error 11"? >>> >>>(It's PHP5 and the scripts source is top secret.) >> >>I believe that if you installed my perror extension: >>http://l-i-e.com/perror/ >>you would be able to easily print out the error message corresponding >>to 11. >> > I can't it's cursed. > >>I suppose you could be old-school and just use a shell with: >>perror 11 >>but that is not nearly as much fun. >> > That puts something out, but where is the realtion? > Doesn't help. Hmmmm. It IS a rather terse message... Allow me to translate, rather freely, into plain English. ------------------------------------ bash: System error: 11 = Resource deadlock avoided English: Your script was about to fork, and I, the Operating System, realized that if I allowed that, you would create a "deadlock" condition in resource management. What that means is that you would have the original process, and the forked child process, BOTH needing access to a single resource. Since it would be impossible to give them both access to that resource, I simply had no choice but to fail to fulfill your request to fork, because it would have created a Resource deadlock. Therefore, I did not fork, and gave you a rather cryptic error message: System error: 11 = Resource deadlock avoided Sorry. ------------------------------- Hopefully you now understand what is wrong, on some level of understanding. What resource is required by both parent and child process, we don't know, since we have no idea what your script is doing, much less what resources it might be needing to do what it is doing. You could try several things at this point: #1. Attempt to simplify your script to do nothing BUT fork. Then start adding in bits and pieces of your script until you figure out what "resource" is in deadlock. Then figure out how to avoid the deadlock, by cloning/duplicating that resource. #1A. Rip bits and pieces OUT of your current script, until it forks okay. #2. Put your script up on http://pastebin.com (or similar) and ask experts to look at it and help you. #3. I vaguely recall that you had many many many forks going at once maybe?... Or was that another guy? If you have TOO many forks, "don't do that" is the answer. Your machine has finite resources. You tried to run too many processes. Don't. -- Like Music? http://l-i-e.com/artists.htm -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php