[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Apache2 crashes constantly on Etch



Hello,

Since the moment we have got an increased amount of customers, our
server started to die once per a day (cronjob execution). Also, if using
apache benchmark tool with a moderate amount of request and concurrent
threads, apache2 processes die.

Environment I run, is following:

Debian GNU/Linux 4.0r1 (etch)

Apache/2.2.3 + PHP 5.2.0-8+etch7 (cgi-fcgi) + mod_fcgid.2.2

I didn't set any limits in limits.conf for user www-data

During the intensive execution apache fails with message in error.log:

sh: fork: Resource temporarily unavailable
[Mon Oct 08 18:52:17 2007] [alert] (11)Resource temporarily unavailable: apr_thread_create: unable to create worker thread

After that I see no apache workers, and only php5-cgi running with uid=0 (normally run under uid=33). I cannot find explanation for such behavior, which drives me crazy, when server is down and some cgi processes are up with root privilleges :-/

My worker conf looks like following:

<IfModule mpm_worker_module>
   StartServers          2
   MaxClients          150
   MinSpareThreads      25
   MaxSpareThreads      75
   ThreadsPerChild      25
   MaxRequestsPerChild   0
</IfModule>

I did some experiments, changing it to:

<IfModule mpm_worker_module>
   ServerLimit          20
   StartServers          5
   MaxClients          500
   MinSpareThreads      25
   MaxSpareThreads      75
   ThreadsPerChild      25
   MaxRequestsPerChild   0
</IfModule>

Surprisingly, this change lead to error in error log.

[Sat Oct 06 14:35:21 2007] [alert] (11)Resource temporarily unavailable: apr_thread_create: unable to create worker thread

After direct php script execution (php5 $script) I see this message, when there are many execution threads:

php (pre-forking): Resource temporarily unavailable

Seems some kind of limits prevent intensive forking and threading..I cannot figure that out. All my attepts has been failed to determine the cause. The same situation can be seen in our development server (load is lower compared to production), which is also Debian Stable.

If you have any thoughts or experience, please share it to me. I appreciate whatever kind of recommendations from you, guys.
Hope for your assistance.

Thanks in advance!

--
Aleks Feltin
System Administrator
Sunset Wireless Ltd.

Attachment: signature.asc
Description: Digital signature


Reply to: