ID:               47712
 Comment by:       ninzya at inbox dot lv
 Reported By:      ninzya at inbox dot lv
 Status:           Feedback
 Bug Type:         MySQL related
 Operating System: Windows XP
 PHP Version:      5.3.0RC2
 Assigned To:      mysql
 New Comment:

Hello, Andrey.

Well, the script you are using is not exactly the same i have provided.
Try testing for values of $row keys, see if the contained data is the
data you expect, as i did in my case. Do not rely on PHPT, try
benchmarking locally. I will try my code on linux machine and report in
a couple of minutes.


Previous Comments:
------------------------------------------------------------------------

[2009-06-08 13:17:46] and...@php.net

Just tried again. 2 million requests, concurrency of 150, which led to
load of 90 on the box - pretty hefty, where a problem should show itself
and again no problem except that in some cases connection to MySQL
couldn't be established, which is to be expected. MySQL was set up to
have 1000 maximal connections, so it is not the bottleneck, just system
resources.

------------------------------------------------------------------------

[2009-06-08 12:46:49] and...@php.net

Hi, I switched on the zval cache and tried to reproduce the problem,
with no success.
I tested with Apache2 MPM. `ab` concurrency level starting from 20 up
to 100. Time from 30 to 45 seconds. I got, with your code, only 3 types
of errors. I added mysql_connect() myself
- mysql_connect() fails because cannot have more connections on the
unix socket. Using TCP/IP exhausts the resources earlier for connecting
to MySQL
- mysql_query() tries to connect, although the connection has failed,
typical for mysql_query()! It fails :
-- password problem
-- no resources

I did not see any corruption whatsoever. Difference from you is that I
tested on Linux, as server. ab was running on a Mac connected over a
FastEthernet switch.

Here follows the code I used:

<?php
$conn = mysql_connect("localhost", "root", "root");
mysql_select_db("test");
$result = mysql_query("SELECT a,b FROM stress_test");
if (!$result) {
    echo 'Could not run query: ' . mysql_error();
    exit;
}
/* Use the result, assuming we're done with it afterwards */
$row = mysql_fetch_assoc($result);

/* Now we free up the result and continue on with our script */
mysql_free_result($result);
var_dump($row);
?>

------------------------------------------------------------------------

[2009-06-08 10:36:49] and...@php.net

 Is is possible to provide a package which we can run, even it is not
20-30lines of code, so we can try to reproduce the problem?

In the meanwhile I have committed a change to mysqlnd which I suppose
should lead to the problem disappearing - switching the zval cache off.
Could you try downloading and testing a binary from
http://windows.php.net/snapshots/

New snapshot should be ready in a few hours. I suppose you will need
the VC6 build.

Thank you!
Andrey

------------------------------------------------------------------------

[2009-05-12 09:42:13] ninzya at inbox dot lv

This bug is still present in PHP 5.3.0RC2 and is critical to me.

------------------------------------------------------------------------

[2009-04-19 12:04:11] ninzya at inbox dot lv

Changed bug summary.

My configuration:
  Apache 2.2,
  PHP 5.3.0RC1 as module,
  Windows XP SP3,
  MySQL community server 5.1.33

Bug being hit during high concurrency running apache benchmark: "ab -c
30 -n 10000". See previous posts for details.

------------------------------------------------------------------------

The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
    http://bugs.php.net/47712

-- 
Edit this bug report at http://bugs.php.net/?id=47712&edit=1

Reply via email to