note 3877 deleted from configuration by jimw

From: Date: Wed, 31 Oct 2001 01:00:38 +0000
Subject: note 3877 deleted from configuration by jimw
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-19646@lists.php.net to get a copy of this message
Just a note about configuration issues. <P> I think there is a need to emphasize the fact that there is actually no way to know how many persistent connections will the web server open to the database. <br> There is a trade-off as to persistent/usual links to DB - if you do not use persistent links, opening and closing the links will produce serious overhead. On the other hand, when you use only persistent links, it will produce piece of load on the DB server - if somebody else is supposed to use it, too, you may finish up eating all free persistent connections, leaving nothing to these other processes. So you can't say it is too good, too. <p> Thus, you need to bound your connections on the DB side - and than you need to wait on the PHP side until the connection is free to use. I.e., pconnect functions don't wait for the connection to become available, they just fail, and you need to try again in a loop. <p> From the third side, when the child process dies, it closes all persistent links, so you can influence the total number of persistent links by setting maxrequestsperchild (Apache).

« previous php.notes (#19646) next »