Bug #31534 Proxy hangs with connection storm
Submitted: 11 Oct 2007 13:49 Modified: 13 Aug 2008 9:46
Reporter: Ronald Bradford Email Updates:
Status: Can't repeat Impact on me:
Category:MySQL Proxy: Core Severity:S2 (Serious)
Version:0.6.0 OS:Linux (FC6)
Assigned to: CPU Architecture:Any
Tags: Connection, hang, java, proxy

[11 Oct 2007 13:49] Ronald Bradford
When using MySQL Proxy (with firewall forward rule), connections freeze and become unresponsive.

Problem occurs with starting of application with a large number of initial connections.

Access via application or mysql client results in no response.

Details of strace to be added.

How to repeat:
Base Line:

Database Server running MySQL Server 5.0.36sp1
Application Server (JBoss,Connector/J 5.1.5) starts
On startup approx 634 connections are made (show processlist) to 6 different schemas
Application responses to requests
mysql client access to server via proxy responds


MySQL proxy (no scripts) is started
iptables firewall rule to forward all no local 3306 traffic to 4040 is enabled
Application is started
Approx 510 connections are made (show processlist) (less then expected)
Attempt to connect to database server using mysql client via proxy hangs, unresponsive
Attempt to use the application results in freezing application. 

If the session used for the processlist is exited, mysql connection that appears frozen on connection responses. See strace details.

Suggested fix:
The work around was to reduce the number of connections to below this 500 limit.
[11 Oct 2007 14:00] Ronald Bradford
Strace of mysql proxy process in frozen state

Attachment: bug.proxy.strace.txt (text/plain), 7.74 KiB.

[11 Oct 2007 14:01] Ronald Bradford
strace of mysql client connecting via proxy in frozen state

Attachment: bug.mysql.strace.txt (text/plain), 3.09 KiB.

[11 Oct 2007 14:01] Ronald Bradford
strace of mysql client, freezing after password, then responding after another connection is exited

Attachment: bug.mysql2.strace.txt (text/plain), 7.85 KiB.

[21 Oct 2007 6:56] Sveta Smirnova
Thank you for the report.

Do you experience same problem with forwarding from some port to another, but without proxy? Please also provide output of `ulimit -a`
[22 Oct 2007 14:46] Ronald Bradford
This was while on a client site, now 2 clients ago. I have no further access to equipment to provide additional details.
[13 Aug 2008 9:46] Sveta Smirnova
Thank you for the feedback.

I can not repeat described behavior in my environment with pool of test connections. So I close the report as "Can't repeat". Feel free to repopen the report if you have more information regarding to the issue.