LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 09-22-2014, 07:58 AM   #1
Pandamaury
LQ Newbie
 
Registered: Sep 2014
Posts: 4

Rep: Reputation: Disabled
Post Useless mutex ?


Hello

Last week we tried to restart Apache but we had a bug. Apparently there were too many mutexes in use so it was not able to start.

When I was looking at the existing mutexes I saw that many of them don't seem to be used. The fields ncount and zcount of ipcs -s -i <semid> were both at 0, meaning that nothing is waiting for it or using it (that's what I understood, is it right ?).

When looking for process with the pid indicated in the pid field of ipcs there were 0 returns (ps -ef | grep <pid>).

Does this mean that these mutex are useless ? Are they some kind of zombies ? Can I delete them ?

Thanks in advance
 
Old 09-22-2014, 08:33 AM   #2
smallpond
Senior Member
 
Registered: Feb 2011
Location: Massachusetts, USA
Distribution: Fedora
Posts: 4,137

Rep: Reputation: 1263Reputation: 1263Reputation: 1263Reputation: 1263Reputation: 1263Reputation: 1263Reputation: 1263Reputation: 1263Reputation: 1263
When asking a question about an error, please paste the actual message that you see.
 
Old 09-22-2014, 10:08 AM   #3
Pandamaury
LQ Newbie
 
Registered: Sep 2014
Posts: 4

Original Poster
Rep: Reputation: Disabled
The question is not really about the error but about the possibility of useless mutexes.

I don't have the error anymore but after we deleted some mutexes, Apache was able to start again.

Sorry if it wasn't clear
 
Old 09-24-2014, 02:00 AM   #4
GaWdLy
Member
 
Registered: Feb 2013
Location: San Jose, CA
Distribution: RHEL/CentOS/Fedora
Posts: 457

Rep: Reputation: Disabled
It's more likely to be a tuning or application issue than apache doing something "useless" with the semaphore. The one experience I have with semaphore trouble on an apache box was actually caused by overly slow db queries, and had nothing to do with apache. If the db wasn't choking, the semaphores wouldn't have run out.
 
Old 09-24-2014, 07:10 AM   #5
Pandamaury
LQ Newbie
 
Registered: Sep 2014
Posts: 4

Original Poster
Rep: Reputation: Disabled
Ok.

Does this mean that I can erase these semaphores or is it better to keep them ?[COLOR="Silver"]

Last edited by Pandamaury; 09-24-2014 at 07:31 AM.
 
Old 09-24-2014, 11:22 PM   #6
GaWdLy
Member
 
Registered: Feb 2013
Location: San Jose, CA
Distribution: RHEL/CentOS/Fedora
Posts: 457

Rep: Reputation: Disabled
Quote:
Originally Posted by Pandamaury View Post
Ok.

Does this mean that I can erase these semaphores or is it better to keep them ?[COLOR="Silver"]
You can dump the semaphores using ipcrm, and you can increase the number of semaphores on the system.

Here's a quick article about increasing sems: https://access.redhat.com/solutions/2896

And one about deleting ipcrm: http://stackoverflow.com/questions/2...hores-on-linux

And another: http://serverlinux.blogspot.com/2007...emaphores.html

I remember how crappy this was when it happened to me. We had to invest extensively in revamping our database in order to resolve the issue. Hopefully you don't need to go so far.
 
Old 09-25-2014, 02:13 AM   #7
Pandamaury
LQ Newbie
 
Registered: Sep 2014
Posts: 4

Original Poster
Rep: Reputation: Disabled
Ok, thanks !
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
mutex vs semaphore vishnu anand Programming 1 12-19-2011 03:41 PM
locks , mutex sha_neb Programming 2 02-02-2011 10:20 AM
Mutex v/s Semaphore jayadhanesh Linux - Software 3 12-07-2010 12:20 AM
Why does pthread_cond_wait need a mutex? fuzzyBuzz Programming 4 06-01-2009 02:16 PM
Mutex new2lunix Programming 1 12-02-2008 08:12 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 06:48 AM.

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