| Bug #20629 | DBD::mysql::db do failes when too many concurrenct connections | ||
|---|---|---|---|
| Submitted: | 22 Jun 2006 15:09 | Modified: | 21 Feb 2013 22:03 |
| Reporter: | Oli Sennhauser | Email Updates: | |
| Status: | Unsupported | Impact on me: | |
| Category: | Connectors: DBD::mysql ( Perl ) | Severity: | S3 (Non-critical) |
| Version: | 3.0006, 5.0.25-BK, 5.0.22 | OS: | Linux (linux and windows) |
| Assigned to: | CPU Architecture: | Any | |
[22 Jun 2006 15:12]
Oli Sennhauser
We were able to reproduce on different machines, on linux, win...
[22 Jun 2006 15:20]
Valeriy Kravchuk
Thank you for a problem report. Plwase, specify the exact version of DBD::mysql used.
[22 Jun 2006 15:33]
Oli Sennhauser
perl -MDBD::mysql -e 'print "$DBD::mysql::VERSION\n";' 2.9004 But in the Workshop yesterday we downloaded the newest version from the web I think...
[23 Jun 2006 7:06]
Oli Sennhauser
I installed now the brand new DBI and DBD and it still fails: # perl --version This is perl, v5.8.6 built for i586-linux-thread-multi ... # perl -MDBI -e'print "$DBI::VERSION\n";' 1.51 # perl -MDBD::mysql -e'print "$DBD::mysql::VERSION\n";' 3.0006
[23 Jun 2006 9:44]
Valeriy Kravchuk
Please, try with -n 100. Check max_connections setting on all the MySQL servers you had used. It is 100 by default...
[23 Jun 2006 9:59]
Oli Sennhauser
No difference changing -n to 100. As soon as I set -c bigger than 1 it becomes unstable. As bigger as -c is as more unstable it gets and above -c 8 or 16 it does not work anymore. I have the intention that when I set the thread_cache > 0 it is a little more stable. But only a little... I can try it also on my Windows. But only if it realy helps you (win igigit!)...
[19 Jul 2006 12:59]
Valeriy Kravchuk
Verified just as described with your test script, with 5.0.25-BK and DBD::mysql 3.0006 on Linux:
openxs@suse:~/dbs/5.0> perl benchmark-sql.pl --user=root --host='127.0.0.1' --f
lush=0 -c 5 -n 10 --schema=test -e "select 1"
DBD::mysql::db do failed: Lost connection to MySQL server during query at benchm
ark-sql.pl line 112.
at benchmark-sql.pl line 112
openxs@suse:~/dbs/5.0> perl benchmark-sql.pl --user=root --host='127.0.0.1' --f
lush=0 -c 5 -n 1 --schema=test -e "select 1"
Total Time is: 0.1550
Number of Iterations: 1
Number of Clients: 5
# Time/Query Total Time Query
--- ---------- ---------- -----
1. 0.03097 0.15484 select 1
1. select 1
openxs@suse:~/dbs/5.0> perl benchmark-sql.pl --user=root --host='127.0.0.1' --f
lush=0 -c 5 -n 2 --schema=test -e "select 1"
DBD::mysql::db do failed: Lost connection to MySQL server during query at benchm
ark-sql.pl line 112.
at benchmark-sql.pl line 112
openxs@suse:~/dbs/5.0> perl benchmark-sql.pl --user=root --host='127.0.0.1' --f
lush=0 -c 1 -n 2 --schema=test -e "select 1"
Total Time is: 0.0068
Number of Iterations: 2
Number of Clients: 1
# Time/Query Total Time Query
--- ---------- ---------- -----
1. 0.00338 0.00676 select 1
1. select 1
openxs@suse:~/dbs/5.0> perl benchmark-sql.pl --user=root --host='127.0.0.1' --f
lush=0 -c 1 -n 200 --schema=test -e "select 1"
Total Time is: 0.1830
Number of Iterations: 200
Number of Clients: 1
# Time/Query Total Time Query
--- ---------- ---------- -----
1. 0.00091 0.18290 select 1
1. select 1
openxs@suse:~/dbs/5.0> perl benchmark-sql.pl --user=root --host='127.0.0.1' --f
lush=0 -c 2 -n 200 --schema=test -e "select 1"
Total Time is: 0.4189
Number of Iterations: 200
Number of Clients: 2
# Time/Query Total Time Query
--- ---------- ---------- -----
1. 0.00105 0.41879 select 1
1. select 1
openxs@suse:~/dbs/5.0> perl benchmark-sql.pl --user=root --host='127.0.0.1' --f
lush=0 -c 5 -n 200 --schema=test -e "select 1"
ERROR processing SQL statement #1:
select 1
DBD::mysql::db do failed: Lost connection to MySQL server during query at benchm
ark-sql.pl line 132.
at benchmark-sql.pl line 132
eval {...} called at benchmark-sql.pl line 132
[21 Feb 2013 22:03]
Sveta Smirnova
Thank you for the report. We don't work on DBD::mysql bugs anymore. All its bugs should go to CPAN: https://rt.cpan.org/Public/Dist/Display.html?Name=DBD-mysql I re-submitted your report to https://rt.cpan.org/Public/Bug/Display.html?id=83520 Please subscribe to the new report on CPAN and work with DBD::mysql developers in case if they need additional details. I did not find a way to re-send attached test case privately. Please, remove all sensitive data and attach it to CPAN yourself.

Description: When we run a benchmark script which need for the PT Workshop. It gives an error with too many concurrent connections. How to repeat: # perl benchmark-sql.pl --flush=0 -c 1 -n 10000 --schema=world -e "select 1" Total Time is: 1.0333 Number of Iterations: 10000 Number of Clients: 1 # Time/Query Total Time Query --- ---------- ---------- ----- 1. 0.00010 1.03315 select 1 1. select 1 # perl benchmark-sql.pl --flush=0 -c 5 -n 2000 --schema=world -e "select 1" ERROR processing SQL statement #1: select 1 DBD::mysql::db do failed: Lost connection to MySQL server during query at benchmark-sql.pl line 132. at benchmark-sql.pl line 132 eval {...} called at benchmark-sql.pl line 132 # perl benchmark-sql.pl --flush=0 -c 25 -n 400 --schema=world -e "select 1" DBD::mysql::db do failed: Lost connection to MySQL server during query at benchmark-sql.pl line 112. at benchmark-sql.pl line 112