restart apache and clear semaphore arrays

effordable

Verified User
Joined
Jun 3, 2007
Messages
6
Location
Kansas
Hello everyone.

I'm plagued with semaphore arrays :eek:
While I've not yet found a real "fix" for the issue, I have setup SIM to use a script to restart apache and clear them out.

Here's what I did.
Create a file with the following:
Code:
#!/bin/sh
/sbin/service httpd stop
ipcs -s | grep apache | gawk '{ print $2 }' | xargs -n 1 ipcrm sem
/sbin/service httpd start
chmod 711

Next I adjusted sim.conf to use my file when restarting apache

Pretty simple huh:D

If anyone has a real fix for this, please let me know.
Hope this helps.
 
The working fix is that when you run out of semaphores you do exactly what you did.

There are as many ways to do it as there admins, of course. If you put the code directly into the apche restart code it'll probably do it often enough so it won't be a problem anymore.

In our case, using CentOS/Red Hat, we make changes all the time to the start/stop scripts.

Jeff
 
Back
Top