Bug #51909 [Opn]: mysqli hangs after small request storms.
| From: | ixti at member dot fsf dot org | Date: | Wed, 26 May 2010 07:33:42 +0000 |
| Subject: | Bug #51909 [Opn]: mysqli hangs after small request storms. | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-150820@lists.php.net to get a copy of this message | ||
Edit report at http://bugs.php.net/bug.php?id=51909&edit=1
ID: 51909
User updated by: ixti at member dot fsf dot org
Reported by: ixti at member dot fsf dot org
Summary: mysqli hangs after small request storms.
Status: Open
Type: Bug
Package: MySQLi related
Operating System: Debian GNU/Linux
PHP Version: Irrelevant
Assigned To: mysql
New Comment:
Please let me know if you want more information from me. I'm running
Debian
GNU/Linux "testing" with some "sid" mixins :)) But the bug (as you can
see in the
discussion) was first reproduced on FreeBSD :))
Previous Comments:
------------------------------------------------------------------------
[2010-05-26 00:55:30] ixti at member dot fsf dot org
above
------------------------------------------------------------------------
[2010-05-26 00:54:20] ixti at member dot fsf dot org
Hello,
I have tested it against latest snapshot and it wokred fine.
Here's my configuration:
PHP Version 5.3.3-dev
System: Linux msi-s300 2.6.30-2-686 #1 SMP Fri Dec 4 00:53:20 UTC 2009
i686
Build Date: May 26 2010 00:21:01
mysqli
MysqlI Support: enabled
Client API library version: 5.1.46
PS I have tested against latest snapshot using PHP as CGI module (while
error was met on 5.3.2 used as Apache 2.0 Handler)
PPS On latest snapshot version mysqli_free_result($result); from test
script started producing a warning:
mysqli_result::close() ... Couldn't fetch mysqli_result
in /var/www/mysqli.php on line 16
------------------------------------------------------------------------
[2010-05-25 23:51:24] felipe@php.net
Please try using this snapshot:
http://snaps.php.net/php5.3-latest.tar.gz
For Windows:
http://windows.php.net/snapshots/
------------------------------------------------------------------------
[2010-05-25 22:46:51] ixti at member dot fsf dot org
Shortened URL of discussion thread: http://bit.ly/aNDeW4
------------------------------------------------------------------------
[2010-05-25 22:26:17] ixti at member dot fsf dot org
Description:
------------
The problem is that MySQLi completely hangs after a small storm of
requests. I
have prepared a sample script (attached into bug report) with SQL script
used to
create and populate table (see http://gist.github.com/413635). I also
used dummy
http client written in ruby to storm it with requests. After ~ 130
requests
proceded one after another MySQLi completely hangs out and stops working
until
Apache2 is restarted. I was tested same storming with pdo_mysql and it
was
working like a charm (more than 1024 continiously repeated requests).
This bug was found upon discussing strange problem in zend Framework
mailing
list. Please refer to discussion for more details:
http://zend-framework-
community.634137.n4.nabble.com/Saving-many-Zend-Db-Table-Rows-in-for-loop-
td2220281.html
Test script:
---------------
<?php
$host = 'localhost';
$user = 'user';
$pass = 'pass';
$name = 'test';
header('Content-Type: text/plain');
$mysqli = mysqli_connect($host, $user, $pass, $name);
if ($result = $mysqli->query('SELECT * FROM
my_table')) {
while ($obj = $result->fetch_object()) {
echo $obj->id . ' - ' . $obj->title . PHP_EOL;
}
mysqli_free_result($result);
$result->close();
}
$mysqli->close();
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/bug.php?id=51909&edit=1