Aborted Connections / Error reading communication packets
Posted: Sun 28 Feb 2010 02:57
Hello,
I am trying to handle a problem with "Lost Connection to MySQL Server during query." As part of this, I have increased the log level of the server to get more info on what causes abrupt connection terminations. I am now getting a ton of messages like "Aborted connection 783034 to db: 'Sales' user: 'cho' host: '192.168.1.10' (Got an error reading communication packets)" in the log file. There are literally thousands of such messages in only a few days.
I believe this is due to connection pooling, so I did some testing and the messages seem to enter the log file whenever an application exits. But I cannot turn pooling off for performance reasons. So I tried MySqlConnection.ClearAllPools() when exiting the app. That did not help since it does not actually clear the connections for about 30 seconds. If I call ClearAllPools and then wait for more than 30 seconds, the app exits just fine without any "Aborted connection" entries in the log file.
Is there any way to make the pool properly close all connections upon exit of the app? Maybe adding a ClearAllPoolsImmediately() method (that blocks until done, which should not take long)?
Once this huge number of messages no longer clutter the error log, it will be much easier to see other, more important messages.
I have another question relating to "Lost Connection to MySQL Server during query" that I will post separately.
Thanks,
Lars
I am trying to handle a problem with "Lost Connection to MySQL Server during query." As part of this, I have increased the log level of the server to get more info on what causes abrupt connection terminations. I am now getting a ton of messages like "Aborted connection 783034 to db: 'Sales' user: 'cho' host: '192.168.1.10' (Got an error reading communication packets)" in the log file. There are literally thousands of such messages in only a few days.
I believe this is due to connection pooling, so I did some testing and the messages seem to enter the log file whenever an application exits. But I cannot turn pooling off for performance reasons. So I tried MySqlConnection.ClearAllPools() when exiting the app. That did not help since it does not actually clear the connections for about 30 seconds. If I call ClearAllPools and then wait for more than 30 seconds, the app exits just fine without any "Aborted connection" entries in the log file.
Is there any way to make the pool properly close all connections upon exit of the app? Maybe adding a ClearAllPoolsImmediately() method (that blocks until done, which should not take long)?
Once this huge number of messages no longer clutter the error log, it will be much easier to see other, more important messages.
I have another question relating to "Lost Connection to MySQL Server during query" that I will post separately.
Thanks,
Lars