Could not obtain semaphore

Post Reply
penny
Posts: 11
Joined: Tue May 29, 2001 2:15 pm

Could not obtain semaphore

Post 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?
User avatar
John
Site Admin
Posts: 2597
Joined: Mon Apr 24, 2000 3:18 pm
Location: Cleveland, OH
Contact:

Could not obtain semaphore

Post 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.
John Turnbull
Thunderstone Software
neil.munro
Posts: 22
Joined: Fri Nov 09, 2001 1:13 am

Could not obtain semaphore

Post 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?
User avatar
John
Site Admin
Posts: 2597
Joined: Mon Apr 24, 2000 3:18 pm
Location: Cleveland, OH
Contact:

Could not obtain semaphore

Post 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.
John Turnbull
Thunderstone Software
neil.munro
Posts: 22
Joined: Fri Nov 09, 2001 1:13 am

Could not obtain semaphore

Post 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
Post Reply