On Monday 05 March 2007 15:08, Jonathan Vanasco wrote: > On Mar 5, 2007, at 3:40 PM, Perrin Harkins wrote: > > Look for things that use locking. Anything that updates a file or a > > database row. In particular, look for things that do this and would > > happen on every type of request that you've seen hanging so far. > > As a note, you could run into blocks/locks/stalls from foreign keys. > > I recently had this code in my system > > handle 1- select * from account where id = 1; > handle 2- update visit set visit_count= visit_count+1 where > account_id = 1; # account_id fkeys on account > > it took me forever to realize why my system kept locking. the select > + transaction on handle 1 was getting an exclusive lock, and the > update was queued , trying to do an internal select on the fkey for > integrity checks > > the moral: db lock problems can happen where you least expect them >
There is an update that occurs to the session management tables everytime a request is made when the user is logged in. I'll take a look at those updates maybe something is going on there. Thanks for the insights guys you've been very helpful. > > // Jonathan Vanasco > Jeremy Wall