Bug #38107 | mysqli creating multiple persistent connections not closing | ||
---|---|---|---|
Submitted: | 14 Jul 2008 15:44 | Modified: | 14 Jul 2008 17:48 |
Reporter: | john knowles | Email Updates: | |
Status: | Duplicate | Impact on me: | |
Category: | MySQL Server: General | Severity: | S2 (Serious) |
Version: | 5.0.27 | OS: | Linux (fedora core 6) |
Assigned to: | CPU Architecture: | Any | |
Tags: | Connections, max connection, mysqli |
[14 Jul 2008 15:44]
john knowles
[14 Jul 2008 16:12]
Sveta Smirnova
Thank you for the report. Please describe way which you use to create multiple connections from PHP. For example, "while(1) $products = products::getinstance();" doesn't create more than 1 connection. Also please indicate version of PHP you use and provide infromation about MySQLi from phpinfo() output.
[14 Jul 2008 16:30]
john knowles
PHP Version: 5.1.6 mysqli MysqlI Support enabled Client API library version 5.0.27 Client API header version 5.0.27 MYSQLI_SOCKET /var/lib/mysql/mysql.sock Directive Local Value Master Value mysqli.default_host no value no value mysqli.default_port 3306 3306 mysqli.default_pw no value no value mysqli.default_socket no value no value mysqli.default_user no value no value mysqli.max_links Unlimited Unlimited mysqli.reconnect Off Off "Please describe way which you use to create multiple connections from PHP. For example, "while(1) $products = products::getinstance();" doesn't create more than 1 connection." re: Sorry for my ingnorance i do not understand what you mean by this.
[14 Jul 2008 16:41]
Sveta Smirnova
Thank you for the feedback. > re: Sorry for my ingnorance i do not understand what you mean by this. In the initial description you wrote: > Creating multiple connections and not closing connections from mysqli php class. Please provide a way how you create multiple connections.
[14 Jul 2008 17:37]
john knowles
The MySQL database created the multiple connections itself when only a single instance was created. It seems to be a similar problem to this bug report but through different methods: http://bugs.php.net/bug.php?id=39457 http://bugs.mysql.com/bug.php?id=33831 A database connection seemed to be made for each query/call to the mysql dbms rather than using persistent connections made by the mysqli library. It seems to be unable to reuse an already opened connection.
[14 Jul 2008 17:48]
Sveta Smirnova
Thank you for the feedback. Closed as duplicate of bug #33831. Please upgrade to PHP 5.3 as was suggested in the PHP bugs database.