I'm trying to stress-test an Apache/PHP -> Cluster setup and for some reason I'm getting many "mysql_query(): Unable to save result set in" errors with many (i.e, usually > 250) concurrent Apache clients.
The strange thing is that happens _sometimes_ but not always, so it's not always reproducible.
I've looked in the logs on the SQL and NDB nodes, and see nothing unusual. (Yes, I enabled general logging and everything else.) The only thing I see is the damn error in PHP :-@
Here is my setup:
Everything is on Ubuntu 10.04.1 (Lucid) on ~8 GB machines.
Cluster uses mysql-cluster-gpl-7.1.5-linux-x86_64-glibc23.tar.gz
2 SQL/MGM Nodes
2 NDB Nodes
Configuration based on severalnines.com/config (wonderful resource!)
1 Web server machine: Apache/PHP set up with approx 310 worker processes.
Apache/PHP on the web server is Ubuntu's (not hand-compiled). I've looked all over, and memory does not seem to be lacking anywhere. Also, PHP is configured with a high memory limit and unlimited persistent connections.
On the Web server I've set up a simple php script that does mysql_pconnect, mysql_select_db, a trivial mysql_query, mysql_fetch_array, and mysql_free_result.
The trivial query is "select * from sessions limit 1";
(There are a few million records in that table, but when it works it always returns one of two values; must be the round-robin'ing to the NDB nodes.)
The error ("mysql_query(): Unable to save result set in...") always occurs on mysql_query, obviously. No errors have ever been reported on pconnect, select_db, fetch_array.
I'm using the "regular" (i.e., non-Cluster) php/mysql client library. Not sure if this could cause the problem. (There's a bug in the Ubuntu apt-get that installs the Cluster client library, and I haven't taken the time to figure that out yet.)
On the web server itself, I run "ab" (pointing it to localhost) on the script.
The script connects to the same SQL node every time.
Related to this, I'm wondering why the SQL node drops ("quits") the persistent connections from the web server after a few seconds of inactivity, even though I'm specifying "MYSQL_CLIENT_INTERACTIVE" in the pconnect.
Any ideas will be greatly appreciated... Thanks in advance. -T.
p.s. I'm cross-posting to the "PHP" forum, too. Sorry for the duplication.
The strange thing is that happens _sometimes_ but not always, so it's not always reproducible.
I've looked in the logs on the SQL and NDB nodes, and see nothing unusual. (Yes, I enabled general logging and everything else.) The only thing I see is the damn error in PHP :-@
Here is my setup:
Everything is on Ubuntu 10.04.1 (Lucid) on ~8 GB machines.
Cluster uses mysql-cluster-gpl-7.1.5-linux-x86_64-glibc23.tar.gz
2 SQL/MGM Nodes
2 NDB Nodes
Configuration based on severalnines.com/config (wonderful resource!)
1 Web server machine: Apache/PHP set up with approx 310 worker processes.
Apache/PHP on the web server is Ubuntu's (not hand-compiled). I've looked all over, and memory does not seem to be lacking anywhere. Also, PHP is configured with a high memory limit and unlimited persistent connections.
On the Web server I've set up a simple php script that does mysql_pconnect, mysql_select_db, a trivial mysql_query, mysql_fetch_array, and mysql_free_result.
The trivial query is "select * from sessions limit 1";
(There are a few million records in that table, but when it works it always returns one of two values; must be the round-robin'ing to the NDB nodes.)
The error ("mysql_query(): Unable to save result set in...") always occurs on mysql_query, obviously. No errors have ever been reported on pconnect, select_db, fetch_array.
I'm using the "regular" (i.e., non-Cluster) php/mysql client library. Not sure if this could cause the problem. (There's a bug in the Ubuntu apt-get that installs the Cluster client library, and I haven't taken the time to figure that out yet.)
On the web server itself, I run "ab" (pointing it to localhost) on the script.
The script connects to the same SQL node every time.
Related to this, I'm wondering why the SQL node drops ("quits") the persistent connections from the web server after a few seconds of inactivity, even though I'm specifying "MYSQL_CLIENT_INTERACTIVE" in the pconnect.
Any ideas will be greatly appreciated... Thanks in advance. -T.
p.s. I'm cross-posting to the "PHP" forum, too. Sorry for the duplication.