For connection problems, the server error log is a useful source of information. If the server was started with the "--log-warnings" option, the following message may be found in the error log:
010301 14:38:23 Aborted connection 854 to db: 'users' user: 'josh'
If the "Aborted connections" (Abort connection) message appears in the error log, the possible causes are:
1. The client program did not invoke Mysql_close () before exiting.
2. The client's idle time exceeds wait_timeout or interactive_timeout seconds, and no requests are made to the server.
3. The client ends abruptly in the middle of data transfer.
When such a situation occurs, the server increases the "aborted_clients" (discard client) state variable.
The server will increase the "aborted_clients" (discard client) state variable when the following conditions occur.
• The client does not have permission to connect to the database.
• The client is using an incorrect password.
• The connection information package does not contain the correct information.
• The time to get the connection packet exceeds connect_timeout seconds.
If this happens, it may indicate that someone is trying to hack into your server!
Other possible sources for discarding the client or abandoning the connection problem include:
• Use Ethernet protocol with Linux, Half-duplex or Full-duplex. Many Linux Ethernet drivers have this flaw. You should test the flaw by transferring large files between the client and server machines through FTP. If the transmission is in Burst-pause-burst-pause (Burst-suspend-break-pause) mode, you are experiencing a Linux duplex failure. The only workaround is to switch the duplex mode of the NIC and hub/to Full-duplex or Half-duplex, and test the results to determine the best setting.
• Some issues related to line threading cause read interrupts.
• Poorly configured TCP/IP.
• Problematic Ethernet, hub, exchanger, cable, etc. Can only be properly diagnosed by replacing the hardware.
• Variable max_allowed_packet is too small or the query requires more memory than is allocated for mysqld.