ID: 18551 Comment by: [EMAIL PROTECTED] Reported By: [EMAIL PROTECTED] Status: Closed Bug Type: MySQL related Operating System: windows 2000 PHP Version: 4.2.2 New Comment:
Are you sure that this flag is the right cure? I see the same with PHP 4.2.2 on Windows via Apache 1.3.26. However, this does NOT occur when using the same PHP setup over IIS. So, this seems to indicate for me that the problem is actually with the php4apache.dll or with Apache. Previous Comments: ------------------------------------------------------------------------ [2002-07-25 05:56:00] [EMAIL PROTECTED] Please download the current CVS version and use mysql_pconnect with the optional parameter client_flags: mysql_pconnect($user, $password, $host, MYSQL_CLIENT_INTERACTIVE); This forces mysql to close idling persistent connections. You have to set the variable interactive_timeout in your my.cnf (300 should be ok). ------------------------------------------------------------------------ [2002-07-24 18:52:21] [EMAIL PROTECTED] PHP is running as apache module (apache version 2.0.39) Multiple call to mysql_Pconnect on same mysqldb host with eachtime same host,user and password parameters cause in somecase to return different php ressourceID. So, as persistent connection on php apache module will be available until thread die, (silently) more and more opened connection to mysql are made. After a certain time, it causes apache to stop to serve http request (without apache2 service die) with an "Cannot get free socket to listen on 0.0.0.0:80) because at this time, it seems there is too many TCP ESTABLISHED state connection between apache and mysql (near 80 on my system). Trying to play with multithreading apache configuration, can delay this problem (serveral hours), but not resolve it;Same for apache keepalive sets to on or off. The only way I found to avoid this trouble is just use non-persistent connection. In this case I can observe that there is always one uniq ressource id for the same host, user and password mysql_connect. PS: Mysql and apache on the same computer. Mysql, apache and php timeouts configurations are all sets by default. Mysql, apache and php are newer installion on a newer W2000 computer. ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=18551&edit=1