ClawfootSupply
asked on
MySQL phpMyAdmin Connections Aborted
MySQL database - Apache web server
In phpMyAdmin under Connections the line for Aborted reads 510K, 25.18K per hr, 167.34%.
What does this mean? What is the mostly likely cause?
In phpMyAdmin under Connections the line for Aborted reads 510K, 25.18K per hr, 167.34%.
What does this mean? What is the mostly likely cause?
Aborted connectections are when a connection packet doesn't contain the right information, the user didn't have privileges to connect to a database (or wrong password) or takes more than connect_timeout to connect.
Most likely you have a script which does not close connections. These are timing out and are aborted.
ASKER
The queries are running fine on the site but the aborted connections keeps growing. It sounds like, as you have said that the script is not closing the connection and that it is timing out, but I have put my connections into classes and close the connection in the destructor. Shouldn't this be called at the end of the script?
You might try freeing the objects manually and see if it changes anything.
ASKER
I put echo 'hello' in the constructor where the connection is opened and echo 'good-bye' in the destructor where the connection is closed and I am always getting matching hello's and good-bye's. The max allowed packet is set at 1M. Is this too small? If it is too small then why do all of the queries seem to run fine?
> The max allowed packet is set at 1M. Is this too small? If it is too small then why do all of the queries seem to run fine?
If you've never received the error message saying the data packet was too big, then it's not the max_allowed_packet either. What about the `Failed attempts` values in phpMyAdmin?
If you've never received the error message saying the data packet was too big, then it's not the max_allowed_packet either. What about the `Failed attempts` values in phpMyAdmin?
ASKER
Failed Attempts = 13 after 1.7M queries
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
is mysql accessible by tcp/ip from external hosts?
It could be that it is getting regular scans from bots looking for open database servers on the web.
It could be that it is getting regular scans from bots looking for open database servers on the web.
ASKER
Yes, it is open to tcp/ip from external hosts. We connect to it using mysql browser. Can bots scan 43K per hour? Is this a problem? Should I restrict this to specific ips? How?
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
I was using stored procedures with prepared statements and mysqli. Any time you get a result set back you need to call next_result() until it is false on the connection object before you close it or it will abort the connection.