Bug #52249 [Fbk->NoF]: Connection not closed on thrown exception, E_ERROR
| From: | php-bugs at lists dot php dot net | Date: | Mon, 18 Feb 2013 00:34:21 +0000 |
| Subject: | Bug #52249 [Fbk->NoF]: Connection not closed on thrown exception, E_ERROR | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-176871@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=52249&edit=1
ID: 52249
Updated by: php-bugs@lists.php.net
Reported by: dinumarina at gmail dot com
Summary: Connection not closed on thrown exception, E_ERROR
-Status: Feedback
+Status: No Feedback
Type: Bug
Package: MySQLi related
Operating System: CentOs
PHP Version: Irrelevant
New Comment:
No feedback was provided. The bug is being suspended because
we assume that you are no longer experiencing the problem.
If this is not the case and you are able to provide the
information that was requested earlier, please do so and
change the status of the bug back to "Open". Thank you.
Previous Comments:
------------------------------------------------------------------------
[2010-07-05 12:00:59] pajoye@php.net
If you are in a hurry, then test it with a decent version (5.2.13 or 5.2.14RC2, 5.3.2 or 5.3.3RC2).
------------------------------------------------------------------------
[2010-07-05 11:39:35] dinumarina at gmail dot com
Hi,
Do you expect it will fix it or just for test? I'm really pressed with time.
------------------------------------------------------------------------
[2010-07-05 10:18:18] johannes@php.net
Please try using this snapshot:
http://snaps.php.net/php5.3-latest.tar.gz
For Windows:
http://windows.php.net/snapshots/
------------------------------------------------------------------------
[2010-07-05 09:47:18] dinumarina at gmail dot com
Description:
------------
PHP version is 5.1.6 I haven't had the chance to run on newer versions but I suspect it's
a persistent structural bug; What happens is MySQLi connection is not closed when script ends if it
terminates due to a raised exception or an E_ERROR. This causes a number of problems from filling
connection pool (mild) to blocking transactions (severe). The connection is never closed until reset
by mysql server. For exceptions, there is the workaround of manually closing the connection in a
default exception handler, but for E_ERROR I couldn't find any closing protocol. If this has
been fixed in the later releases please be so kind to ignore this. However I suspect otherwise since
I could find no discussions related to this. At the moment I don't have time to test with
another release.
Test script:
---------------
mysqli_connect($db_host,$db_user,$db_password);
throw new Exception();
Expected result:
----------------
When a script terminates (especially when crashed) all resources should be freed: all open handles,
tcp connections, etc. I realize there is a problem with persistent connection handling, but a way
should be found to clean up the mess; otherwise one script can trash the whole server by blocking
transactions.
Actual result:
--------------
Connection lingers.
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=52249&edit=1