At work, I was unable to access my Ensim control panel (on RHEL4); the browser kept timing out. So I thought I’d restart it to see if that would fix it. I did the usual:

/etc/init.d/epld restart

And got this error

Stopping Ensim Pro For Linux Control Panel [ OK ]
Stopping Ensim Pro For Linux SSL Tunnel [FAILED]
Starting Ensim Pro For Linux Control Panel [ OK ]
Starting Ensim Pro For Linux SSL Tunnel [FAILED]

I checked the log file and see this:

cat /usr/lib/ensim/frontend/httpd/logs/error_log

…No space left on device: mod_rewrite: could not create rewrite_log_lock

Problem Found

A quick google search told me it was a semaphore problem. So I ran the ipcs command to check my config:

ipcs -l

—— Semaphore Limits ——–
max number of arrays = 128
max semaphores per array = 250
max semaphores system wide = 32000
max ops per semop call = 32
semaphore max value = 32767

Then ran the ipcs command to see how many were semaphores were left:

service httpd stop
ipcs -s | grep apache | wc -l

It showed 110. Not 128, but maybe enough to cause problems. PLUS, it “should” be zero with apache stopped.

Solution

With apache and epld stopped, I ran this command

ipcs -s | grep apache | gawk ‘{ print $2 }’ | xargs -n 1 ipcrm sem

Then started apache/epld again. All is fine.

service httpd start
/etc/init.d/epld start