LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 05-27-2011, 04:53 PM   #1
dazdaz
Member
 
Registered: Aug 2003
Location: Europe
Distribution: RHEL, CentOS, Ubuntu
Posts: 333

Rep: Reputation: 17
apache 2.2.x dying several times an hour


Hi,

I manage an Apache 2.2.3 web server. It stops working several times an hour, so I removed the semaphores and restarted it as a workaround, but I dont know what is causing this. Lately i've noticed that the workaround is not working at all.

Code:
0 */1 * * * /usr/bin/ipcs -s | grep apache | perl -e 'while (<STDIN>) { @a=split(/\s+/); print `ipcrm sem $a[1]`}'
0 */1 * * * /sbin/service httpd restart 1>/dev/null
Below is what I can see in my error_log file.

What is the mutex message telling me. To be honest, I don't know much about semaphores nor how they work. You can see after the semaphore issue, that Apache is sent the SIGTERM signal.

I have seen other posts on this topic, but not explicitly with Linux 2.6.22 and Apache 2.2.3 with a description of the issue and a permanent fix.

Code:
[Fri May 27 22:00:04 2011] [emerg] (43)Identifier removed: couldn't grab the accept mutex
[Fri May 27 22:00:04 2011] [emerg] (43)Identifier removed: couldn't grab the accept mutex
[Fri May 27 22:00:04 2011] [emerg] (43)Identifier removed: couldn't grab the accept mutex
[Fri May 27 22:00:04 2011] [emerg] (43)Identifier removed: couldn't grab the accept mutex
[Fri May 27 22:00:04 2011] [emerg] (43)Identifier removed: couldn't grab the accept mutex
[Fri May 27 22:00:04 2011] [emerg] (43)Identifier removed: couldn't grab the accept mutex
[Fri May 27 22:00:04 2011] [emerg] (43)Identifier removed: couldn't grab the accept mutex
[Fri May 27 22:00:04 2011] [emerg] (43)Identifier removed: couldn't grab the accept mutex
[Fri May 27 22:00:04 2011] [emerg] (43)Identifier removed: couldn't grab the accept mutex
[Fri May 27 22:00:04 2011] [emerg] (43)Identifier removed: couldn't grab the accept mutex
[Fri May 27 22:00:08 2011] [notice] caught SIGTERM, shutting down
[Fri May 27 22:00:17 2011] [notice] suEXEC mechanism enabled (wrapper: /usr/sbin/suexec)
[Fri May 27 22:00:18 2011] [notice] Digest: generating secret for digest authentication ...
[Fri May 27 22:00:18 2011] [notice] Digest: done
PHP Warning:  PHP Startup: eAccelerator: Unable to initialize module\nModule compiled with module API=20050922, debug=0, thread-safety=0\nPHP    compiled with module API=20060613, debug=0, thread-safety=0\nThese options need to match\n in Unknown on line 0
PHP Warning:  PHP Startup: fileinfo: Unable to initialize module\nModule compiled with module API=20050922, debug=0, thread-safety=0\nPHP    compiled with module API=20060613, debug=0, thread-safety=0\nThese options need to match\n in Unknown on line 0

Last edited by dazdaz; 05-27-2011 at 05:00 PM.
 
Old 05-28-2011, 08:22 AM   #2
tronayne
Senior Member
 
Registered: Oct 2003
Location: Northeastern Michigan, where Carhartt is a Designer Label
Distribution: Slackware 32- & 64-bit Stable
Posts: 3,541

Rep: Reputation: 1065Reputation: 1065Reputation: 1065Reputation: 1065Reputation: 1065Reputation: 1065Reputation: 1065Reputation: 1065
There is a section in the Apache 2.21.x manual that speaks to this: http://httpd.apache.org/docs/2.2/misc/perf-tuning.html. Particularly look for Compile-Time Configuration Issues and give it a careful read (taking note that the accept Serialization - multiple sockets may or may not be relevant. Much of the discussion centers around sockets and mutex function (and your hardware and IPC configuration).

It could be as simple as that you do not have enough shared memory allocated; if you were to execute df -h | grep shm you should see something on the order of
Code:
tmpfs           3.9G     0  3.9G   0% /dev/shm
If you don't, you may need to look into allocating more.

Also, take a hard look at your httpd.conf file; if you can, make sure the status module is loaded and allow server status reports to be generated by mod_status and enable ExtendedStatus reports (might give you some hints). I'll be happy to send or post my httpd.conf file if that would help, but be aware that Slackware does the HTTPD configuration in /etc/httpd and includes optional configuration settings in /etc/httpd/extra which may be a little confusing if your implementation is not similar.

Hope this helps some.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Cron job issue - every hour works, but specific hour fails lunarleviathan Linux - Newbie 6 11-20-2009 12:19 AM
Seriously im dying over here PHP 5 Apache 2 king_x Linux - General 25 06-12-2006 09:38 AM
LXer: Good times with Apache LXer Syndicated Linux News 0 05-24-2006 02:21 AM
Aergh. X dies on the hour, every hour l00zer Linux - Software 4 06-07-2005 10:02 PM
change clock from 24 hour to 12 hour in suse 9.2/KDE 3.3 jmlumpkin Linux - Newbie 1 01-22-2005 11:45 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 06:51 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration