From: jan dot lange at artada dot de Operating system: Redhat 7.1 PHP version: 4.3.2 PHP Bug Type: MySQL related Bug description: PHP doesn't close MySQL 4.0 persistent Connections > "Too Many Connections"
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 bug report at http://bugs.php.net/?id=23891&edit=1 -- Try a CVS snapshot: http://bugs.php.net/fix.php?id=23891&r=trysnapshot Fixed in CVS: http://bugs.php.net/fix.php?id=23891&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=23891&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=23891&r=needtrace Try newer version: http://bugs.php.net/fix.php?id=23891&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=23891&r=support Expected behavior: http://bugs.php.net/fix.php?id=23891&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=23891&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=23891&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=23891&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=23891&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=23891&r=dst IIS Stability: http://bugs.php.net/fix.php?id=23891&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=23891&r=gnused
