perl-modperl mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jonathan Vanasco <jvana...@2xlp.com>
Subject Re: Apache2.2 - openssl 0.9.8d - modperl 2.03 unpredictable timeouts during requests
Date Mon, 05 Mar 2007 21:08:36 GMT

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


// Jonathan Vanasco

| - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -  
- - - - - - - - - - - - - - - - - - -
| SyndiClick.com
| - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -  
- - - - - - - - - - - - - - - - - - -
|      FindMeOn.com - The cure for Multiple Web Personality Disorder
|      Web Identity Management and 3D Social Networking
| - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -  
- - - - - - - - - - - - - - - - - - -
|      RoadSound.com - Tools For Bands, Stuff For Fans
|      Collaborative Online Management And Syndication Tools
| - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -  
- - - - - - - - - - - - - - - - - - -



Mime
View raw message