|
| Re: Too Many Connections [message #3762 is a reply to message #3756 ] |
Thu, 04 December 2008 11:40   |
vgatto Messages: 94 Registered: November 2006 |
Member |
|
|
I'm not sure I entirely understand the situation you're describing, but it sounds a little like you've got something that is constantly trying to establish new connections instead of reusing the connections it previously created. If that's the case, when you run SHOW PROCESSLIST, then process id's should get higher and higher every time you run it, instead of staying fixed. Also, if you want to know where connections are coming from, try running netstat on any of the machines where you're running a client or server. In order to get refused by the server, the client has to make a TCP connection and even if it closes that connection immediately, it will be shown in the output of netstat for a little while. Netstat will show you which process made the connection, so that should help you hunt things down if you have some misbehaving program constantly making connections.
|
|
|
|
| Re: Too Many Connections [message #3765 is a reply to message #3764 ] |
Thu, 04 December 2008 15:02  |
vgatto Messages: 94 Registered: November 2006 |
Member |
|
|
Netstat will show connections over loopback (127.0.0.1) and unix sockets, which is what the MySQL client library will use if you specify "localhost". Unfortunately, the unix sockets will disappear from netstat as soon as their connections are closed.
You could try disabling unix sockets on the server, and reconfiguring your code to connect using 127.0.0.1. This will let you use netstat or even tcpdump to figure out what's going on.
|
|
|