(11)Resource temporarily unavailable: couldn't create child process: 11: environment.pl
That error message is produced by this snippet in mod_cgi(d).c of the Apache sources (in routine run_cgi_child()):
rc = ap_os_create_privileged_process(r, procnew, command, argv, en +v, procattr, p); if (rc != APR_SUCCESS) { /* Bad things happened. Everyone should have cleaned up. */ ap_log_rerror(APLOG_MARK, APLOG_ERR|APLOG_TOCLIENT, rc, r, "couldn't create child process: %d: %s", rc, apr_filename_of_pathname(r->filename)); }
If you dig a bit deeper, you'll find that eventually fork() is being called (unsurprisingly), i.e.
if ((new->pid = fork()) < 0) { return errno; }
in ./srclib/apr/threadproc/unix/proc.c, in the routine apr_proc_create().
The errno eventually ends up in rc, which is being reported as 11 (numerically), or as "Resource temporarily unavailable" (text form). The corresponding symbolic form is EAGAIN, which - if you look in HP-UX's fork(2) manpage - is being returned under these two circumstances:
ERRORS If fork() fails, errno is set to one of the following values. [EAGAIN] The system-imposed limit on the total number + of processes under execution would be exceeded. [EAGAIN] The system-imposed limit on the total number + of processes under execution by a single user w +ould be exceeded.
The former limit is the "nproc" setting (unlikely to be the cause here, as you can still run other programs); the latter limit is the already mentioned "maxuprc" tunable. In other words, I'd say the theory fits too well to be ruled out completely, yet... :)
Monitoring the OS we found the total number of process used every each hour(at XX:00) was never exceeding 10 and represented about 0.9% usage.
How exactly did you investigate this? Are you sure you don't have any zombies lingering around, or some such. What do ps and top say when the limit has been reached? Is the limit exactly 30000, or maybe 30K, with K being 1024? Do you really need to reboot the machine, or is simply restarting Apache sufficient? (use stop, start - not restart or graceful - to be sure to actually get a new process for the Apache parent)
In reply to Re^3: Apache / 30,000 Perl script serving limit
by almut
in thread Apache / 30,000 Perl script serving limit
by QcMonk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |