A book I've been reading (PHP and MySQL Web development, I think) says that Apache (if you are using apache...it's probably the same for IIS *shudder*) will open a new mysql connection for each process. It mentioned that the default max childs for Apache is 150 processes, and MySQL (as Rich mentioned) is 100. You normally shouldn't run into a problem unless you have a highly visited site. If so, then change the max values of one to match the other.
This is all in theory, of course, as I've just started working with MySQL... so don't quote me on this. -Dash -----Original Message----- From: Rich Gray [mailto:[EMAIL PROTECTED]] Sent: Tuesday, July 02, 2002 10:04 PM To: Matt Babineau; 'PHP Windows' Subject: RE: [PHP-WIN] mysql_pconnect() Matt I have seen instances with v4.0.6 of php where it didn't re-use persistent connections and opened up another channel for each pconnect - within a small amount of time MySql maxed out and refused any more connections... so if you're using that version of php (or earlier) I would monitor your server closely! There is a default maximum number of open connections in MySQL (100 i think) which can be upped by re-starting the server with max_connections upped to whatever you are comfortable with but that is not answer to the problem really... you could also lower the timeout value so MySQL drops inactive connections earlier... HTH Rich -----Original Message----- From: Matt Babineau [mailto:[EMAIL PROTECTED]] Sent: 02 July 2002 10:54 To: 'PHP Windows' Subject: [PHP-WIN] mysql_pconnect() Here is an interesting question: To save coding time, what would happen if you put a mysql_pconnect to a database for a web site on every page of a web site? because it is a pconnect, would it always reuse the open connection? Does mysql have an open connection limit? what if you put a mysql_close() statement at the end of every page? I am trying to avoid making that data connection every time I need to run a query becaus eit envolves a good amount of code. Any thoughts? Matt Babineau MCWD / CCFD ----------------------------------------- e: <mailto:[EMAIL PROTECTED]> [EMAIL PROTECTED] p: 603.943.4237 w: <http://www.criticalcode.com/> http://www.criticalcode.com PO BOX 601 Manchester, NH 03105 -- PHP Windows Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP Windows Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php