Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

Please help with some ideas about this Apache server crash:

Here is my MPM config and errors

<IfModule prefork.c>
StartServers       5
MinSpareServers    30
MaxSpareServers   40
ServerLimit      950
MaxClients       950
MaxRequestsPerChild  2000
</IfModule>

[Sun Sep 09 03:08:03 2012] [notice] Apache/2.2.15 (Unix) DAV/2 PHP/5.3.16 mod_ssl/2.2.15 OpenSSL/1.0.0-fips configured -- resuming normal operations
[Mon Sep 10 17:26:47 2012] [error] [mod_pagespeed 0.10.22.4-1633 @5088] [0910/172647:ERROR:worker.cc(120)] Unable to start worker thread
[Mon Sep 10 17:26:48 2012] [error] [mod_pagespeed 0.10.22.4-1633 @4983] [0910/172648:ERROR:worker.cc(120)] Unable to start worker thread
[Mon Sep 10 17:26:48 2012] [error] [mod_pagespeed 0.10.22.4-1633 @4915] [0910/172648:ERROR:worker.cc(120)] Unable to start worker thread
[Mon Sep 10 17:26:49 2012] [alert] (11)Resource temporarily unavailable: setuid: unable to change to uid: 48
[Mon Sep 10 17:26:49 2012] [error] [mod_pagespeed 0.10.22.4-1633 @5095] [0910/172649:ERROR:worker.cc(120)] Unable to start worker thread
[Mon Sep 10 17:26:49 2012] [error] [mod_pagespeed 0.10.22.4-1633 @5085] [0910/172649:ERROR:worker.cc(120)] Unable to start worker thread
[Mon Sep 10 17:26:49 2012] [error] [mod_pagespeed 0.10.22.4-1633 @4989] [0910/172649:ERROR:worker.cc(120)] Unable to start worker thread
[Mon Sep 10 17:26:50 2012] [alert] Child 5108 returned a Fatal error... Apache is exiting!
[Mon Sep 10 17:26:50 2012] [emerg] (22)Invalid argument: couldn't grab the accept mutex
[Mon Sep 10 17:26:50 2012] [emerg] (22)Invalid argument: couldn't release the accept mutex
[Mon Sep 10 17:26:50 2012] [emerg] (22)Invalid argument: couldn't release the accept mutex
[Mon Sep 10 17:26:50 2012] [emerg] (22)Invalid argument: couldn't grab the accept mutex
[Mon Sep 10 17:26:50 2012] [emerg] (22)Invalid argument: couldn't grab the accept mutex
[Mon Sep 10 17:26:50 2012] [emerg] (22)Invalid argument: couldn't release the accept mutex
share|improve this question

2 Answers 2

up vote 1 down vote accepted

The most relevant error seems to be:

[Mon Sep 10 17:26:49 2012] [alert] (11)Resource temporarily unavailable: setuid: unable to change to uid: 48

Things just go downhill from there.

This means Apache hit the limit of the maximum number of processes allowed to run.

You can view the limit by running ulimit -u. To increase the limit, run ulimit -u <number> or edit /etc/security/limits.conf (probably Red Hat specific) and add a configuration directive for Apache's user to increase the value for nproc to something more reasonable.

You can also try reducing Apache's ServerLimit and MaxClients directives.

share|improve this answer
    
ulimit reports unlimited –  Cristian Rusu Sep 11 '12 at 7:25
    
It may be unlimited for root, but probably not for apache user! Be sure to check /etc/security/limits.conf or its equivalent if you aren't using a Red Hat derived distribution. –  Michael Hampton Sep 11 '12 at 7:26
    
ulimit -s say 10240 everything is commented out in that file –  Cristian Rusu Sep 11 '12 at 7:39
    
ulimit -u 1024.. I am kind of learing about this limits so I don't really know what is a good value or what 1024 means (limit of opened files?) –  Cristian Rusu Sep 11 '12 at 7:49

Here's a good article explaining how RHEL6 introduced the maximum processes problem ("help ulimit" shows -u is "the maximum number of user processes") by adding the 1024 limit to /etc/security/limits.d/90-nproc.conf, which the author said he just commented out: http://kavassalis.com/2011/03/linux-and-the-maximum-number-of-processes-threads/

Here's the Red Hat Bugzilla page discussing it: https://bugzilla.redhat.com/show_bug.cgi?id=432903

share|improve this answer
    
Explain why you immediately believe this to be a limits issue. –  tristan Mar 27 '13 at 18:26
    
The article states that errno 11 from the setuid() call means the nproc limit was hit, which produces the error log message "[alert] (11)Resource temporarily unavailable: setuid: unable to change to uid: 48". –  user2016290 Mar 27 '13 at 18:41

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.