Page 1 of 1

Could not obtain semaphore

Posted: Thu Sep 20, 2001 10:03 am
by penny
This was the result from the nightly cron job that indexes our site. I used ipcs and ipcrm to remove all semaphore sets, and I'm now re-running the index successfully.

This is the second time I've seen this problem. All the semaphore sets in use were owned by www, group www, which is the user/group that webinator runs as. The system is running Solaris 8, and the only other use of this system is a directory that runs under a different username.

Is there some reason that webinator seems to leave active semaphores?

Could not obtain semaphore

Posted: Thu Sep 20, 2001 10:59 am
by John
That could happen if you are running gw and texis as different user id's, so the last process to stop using the database does not have permission to remove the semaphore. The other possibility would be that the last process was killed, and not given the change to clean up before the database was removed after the rewalk.

Could not obtain semaphore

Posted: Thu Apr 11, 2002 3:07 am
by neil.munro
I have a similar problem that has occurred all of a sudden.
I have a coldfusion script that executes the gw command line, to output the results of a select on the query log table to a text file. The script then reads the file, etc etc and goes on its merry way.
Now, when I debug the code, I am getting a 'Could not obtain semaphore' message.
The same code works on another server. EVERYTHING is set to the same user as webinator/gw/texis including coldfusion. There are no semaphores outstanding (with ipcs).
Where do i look?

Could not obtain semaphore

Posted: Thu Apr 11, 2002 10:13 am
by John
Which OS are you using? Do you have semaphores enabled in the kernel on that machine? Are there are no semaphores shown with ipcs? The message indicates that the OS would not give a semaphore to gw, which would indicate either they are disabled, or something has already obtained them all.

Could not obtain semaphore

Posted: Fri Apr 19, 2002 4:42 am
by neil.munro
Hi,
SORRY !! The semephores were there after all, so apologies for my ignorance.
I have made an appointment with my optometrist for tomorrow :)
rgds