Re: [PHP4BETA] Database Connection Pooling

From: Date: Wed, 01 Mar 2000 18:07:58 +0000
Subject: Re: [PHP4BETA] Database Connection Pooling
References: 1  Groups: php.version4 
Request: Send a blank email to php-version4+get-11272@lists.php.net to get a copy of this message
Hello Andrei, On 01-Mar-00 12:16:21, you wrote: >> >I'd like to know if anyone have plans to code a Database Connection >> >Pooling module to PHP. >> >> Gee, AFAIK that exists from a very long time ago, except that it is called >> persistent connections. Look in the manual for connection establishment >> functions and their persistent counterparts like mysql_connect and >> mysql_pconnect, OCINLogon and OCIPLogon, etc... >> >> AFAIK all supported databases have functions to establish persistent >> connections. They work on a per server process basis. That means >> persistent connections are kept until a server process lives, and >> each server process manages their own pool of persistent connections. >Assumption is the mother of all screw-ups. While PHP does support >persistent connections, those are per Apache process. What it needs is >a common connection pool for all Apache processes. If that is what it was meant, I don't think it is a good idea. One persistent connection per process is better than have Apache processes competing for database connections allocated from a common pool. The way I see it, that would impose needless latency in database connections. Also, I'm afraid that would bring up undesirable shared memory issues and eventual risk inter-process trashing that could compromise the whole server stability. If one server process screws a database connection data, let it trash itself alone without compromising other processes. This is what has been making Apache a solid server. Regards, Manuel Lemos Web Programming Components using PHP Classes. Look at: http://phpclasses.UpperDesign.com/?user=mlemos@acm.org -- E-mail: mlemos@acm.org URL: http://www.mlemos.e-na.net/ PGP key: http://www.mlemos.e-na.net/ManuelLemos.pgp --

« previous php.version4 (#11272) next »