php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #19835 Cannot fork() error when using exec()
Submitted: 2002-10-09 13:54 UTC Modified: 2002-10-09 14:56 UTC
From: veins at skreel dot org Assigned:
Status: Not a bug Package: Unknown/Other Function
PHP Version: 4.2.3 OS: Unix (OpenBSD-3.0)
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: veins at skreel dot org
New email:
PHP Version: OS:

 

 [2002-10-09 13:54 UTC] veins at skreel dot org
Lately, we figured out that PHP was having problems sometimes while working with exec(). We would get a 'Warning: could not fork [some/scripts.sh]' for a delay of about 10 minutes, after what everything comes back to normal.
I tried to log into the server while PHP was giving me the error and noticed that everything was working fine.

This happened once with 4.2.2

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2002-10-09 14:09 UTC] iliaa@php.net
Sorry, but your problem does not imply a bug in PHP itself.  For a
list of more appropriate places to ask for help using PHP, please
visit http://www.php.net/support.php as this bug system is not the
appropriate forum for asking support questions. 

Thank you for your interest in PHP.

This usually means that the system has reached maximum allowed user process' and cannot start any new ones. You can view the limit via the 'ulimit -a' command.
 [2002-10-09 14:42 UTC] veins at skreel dot org
No, the system did not reach the user limit, i could log in and spawn more processes. It was related to PHP !
I searched in google and saw a preceding bug similar to this one that was due to "a misbehaviour in exec()".
 [2002-10-09 14:52 UTC] iliaa@php.net
Each user has it's own limit, when you logged in on a different terminal was it under the same user as the one executing the shell scripts?
 [2002-10-09 14:56 UTC] veins at skreel dot org
yeah, i loggued in as root, gave a temporary shell to the 'www' user then su-ed to 'www'
so that i could try to exec a few commands. I made a few binaries executions to see if
i'd get an error but everything worked while the webpage that does the exec() still showed
Warning: could not fork !

besides, I have set no limit to the number of processes that can be spawned by 'www'
(outside of the number of child processes in httpd.conf).

The error just goes away a few minutes later as if it never happened.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Mon Jul 01 19:01:30 2024 UTC