ID: 23891 User updated by: jan dot lange at artada dot de Reported By: jan dot lange at artada dot de -Status: Bogus +Status: Open Bug Type: MySQL related Operating System: Redhat 7.1 PHP Version: 4.3.2 New Comment:
Yes I can have it! But why don't use PHP the same connection again, for the same Connectiondetails?? Sometimes PHP do it, but sometimes PHP make a new link to MySQL and don't close the old link. And why don't close PHP the persistent connection, after the time out of 60 seconds, that I have set in the php.ini file? Befor I installed MySQL 4.0 on our Server, we have MySQL 3.23. And all the same scripts from all our customers works fine. It were always a pool of 5-8 persistent connections open, from Domains that have heavy load. All other Domains make a connection and after the 60 seks, the link were closed, an the mysql process for this connections is closed. So I think in the MySQL 4.0 libs were made a Change, so that the persistent connection don't close correctly. PHP think it is closed (so it don't can use it again), but in real the link is open and sleep..... Sorry, but I can't explain it good in english. Jan Previous Comments: ------------------------------------------------------------------------ [2003-05-30 08:24:34] [EMAIL PROTECTED] Thank you for taking the time to write to us, but this is not a bug. Please double-check the documentation available at http://www.php.net/manual/ and the instructions on how to report a bug at http://bugs.php.net/how-to-report.php If you use mysql_select_db() or slightly different connection string you can have more open connections then you have process. That is the most likely case in your situation. ------------------------------------------------------------------------ [2003-05-30 04:36:03] jan dot lange at artada dot de Hi! I have upgrade to MySQL 4.0.12 (later to 4.0.13) with PHP 4.3.1 (and now also 4.3.2). Persistent Connections in php.ini is "On" It is a Webserver with many Sites on it. So after 2 to 4 hours every php page says "Too Many Connections" So I look at Processlist, and there are more than 50 processes online! I look with "show processlist" and it were exactly 100 rows in it, so it were 100 connections! When I restart apache, alle connections were closed and the php pages works fine for the next 2-4 hours. I have made tests. And I'm thinking, this is a PHP Bug! Because, I do ONE mysql request over PHP (with pconnect), so I have a persistent MySQL link! I do exatly the same request again (refresh in browser) now I have 2 MySQL links, and so on. The links were closed when MySQL have done a connection time-out, because there were always in state "sleep" When I look at phpinfo() page, at the MySQL section I see on the activ Webserver 1 or 2 activ persistent links. But on MySQL it were 88 connections or more. So I think, php close the MySQL connections and think they were closed, but they don't be in real. On the latest MySQL 3.23 release, the Webserver have worked always fine with persistent connections. Greetings Jan ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=23891&edit=1
