Bug #51909 [NEW]: mysqli hangs after small request storms.
| From: | ixti at member dot fsf dot org | Date: | Tue, 25 May 2010 20:26:25 +0000 |
| Subject: | Bug #51909 [NEW]: mysqli hangs after small request storms. | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-150799@lists.php.net to get a copy of this message | ||
From:
Operating system: Debian GNU/Linux
PHP version: Irrelevant
Package: MySQLi related
Bug Type: Bug
Bug description:mysqli hangs after small request storms.
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 bug report at http://bugs.php.net/bug.php?id=51909&edit=1
--
Try a snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=51909&r=trysnapshot52
Try a snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=51909&r=trysnapshot53
Try a snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=51909&r=trysnapshot60
Fixed in SVN: http://bugs.php.net/fix.php?id=51909&r=fixed
Fixed in SVN and need be documented: http://bugs.php.net/fix.php?id=51909&r=needdocs
Fixed in release: http://bugs.php.net/fix.php?id=51909&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=51909&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=51909&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=51909&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=51909&r=support
Expected behavior: http://bugs.php.net/fix.php?id=51909&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=51909&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=51909&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=51909&r=globals
PHP 4 support discontinued: http://bugs.php.net/fix.php?id=51909&r=php4
Daylight Savings: http://bugs.php.net/fix.php?id=51909&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=51909&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=51909&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=51909&r=float
No Zend Extensions: http://bugs.php.net/fix.php?id=51909&r=nozend
MySQL Configuration Error: http://bugs.php.net/fix.php?id=51909&r=mysqlcfg