MySQL Forums
Forum List  »  MyISAM

When can SELECT GET_LOCK() fail?
Posted by: Luke Monahan
Date: August 24, 2006 08:51PM

Hi All,

I have recently begun using "SELECT GET_LOCK()" in my application rather than "LOCK TABLES" so we can use more fine grained locking.

It all works fine, except for a very small percentage of cases where the lock fails. The "SELECT GET_LOCK()" statement returns NULL without waiting for the timeout. Our logging for one day shows that this happened 19 times in about 30K times the lock was invoked.

This invariably happens under high load spikes where we have the lock being performed hundreds of times per second or more.

Is there any hard limit to locking in this manner that I should be aware of? A limit to the length of the queue of threads waiting for the lock possibly? Any other reason it would return NULL on us.

Using MySQL 4.1.15-Max on RHEL4 (x64).

Thanks,

Luke.

Options: ReplyQuote


Subject
Views
Written By
Posted
When can SELECT GET_LOCK() fail?
5571
August 24, 2006 08:51PM
2307
September 05, 2006 02:23AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.