[drupal-devel] LOCK vs. SELECT FOR UPDATE

Allie Micka allie at pajunas.com
Thu Sep 29 22:47:40 UTC 2005

>> Do successive requests from the same web server reuse the same  
>> connection?
> End of PHP script closes connection. If you have the knowledge to  
> change DB layer to use pconnect then you certainly can (re) 
> introduce LOCKing.

Someone with more knowledge of threaded MPM's and/or alternate  
platforms would have to pipe in on this, but with prefork apache, the  
connection is attached to a httpd child.

Without pconnect, the connection closes at the end of the script's  
execution.  With pconnect, the connection stays open for use by a  
subsequent request using that process.  Subsequent != concurrent, so  
you shouldn't be seeing any race conditions or multiple processes  
using a connection at the same time.

Allie Micka
pajunas interactive, inc.

scalable web hosting and open source strategies

More information about the drupal-devel mailing list