Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

My brother and i share a dedicated linux server, with Plesk CP. On this server we have 4 MYSQL databases, plus my sound files for my music site. our ASP is hosted elsewhere. For the last few days the server has been going down, and simultaneously, none of the sites can connect to the server. Usually the error is this

Microsoft OLE DB Provider for ODBC Drivers error '80004005'

[MySQL][ODBC 3.51 Driver]Lost connection to MySQL server at 'reading initial communication packet', system error: 0

but we also get this error on some occasions :-

[MySQL][ODBC 3.51 Driver]Host 'server213-171-218-93.livedns.org.uk' is blocked because of many connection errors; unblock with 'mysqladmin flush-hosts'

i have ran a flush-hosts and this will help for a little while, but within a few hours the sites will be down again

we have 4 sites running, and when one is down, they will all be down. I can still access the control panel, and when i look at the MYSQL engine, it is still running, and i can browse the tables etc.

i have checked the number of concurrent connections for all the databases and it is never above 10 or so.

i have not been messing with any of the scripts of the sites for a long time, so i am at a loss as what is causing it to crash. we have had this server for a few years, and it has been fine until now.

i did notice that the query stats seemed quite high, as we only get about 500 hits a day to all 4 sites combined. here is a copy and paste of the stats:-

Query statistics: Since its startup, 34,358 queries have been sent to the server. (this was in 6 hours since it was rebooted)

i thought we may have been hacked, so changed all passwords, but that didnt help

anyone have any ideas what else i should look into?

share|improve this question

1 Answer 1

many connection errors

show that there is some communication problem.

You could raise max_connect_errors to give you time to find issue. Take a look at http://dev.mysql.com/doc/refman/5.0/en/blocked-host.html

share|improve this answer
    
we raised the max. number of connections allowed to 500 a few months ago, as we had a few problems, and this seemed to help with that particular problem since then, we found the script that wasnt closing the database, and fixed that problem. now, when checking the maximum number of connections in the server stats, it never has more than 20 concurrent connections, so i am not sure that raising it any further would help –  jason Jun 10 '13 at 9:39
    
I'm talking about setting to allow more error before host being banned. –  dr-evil Jun 10 '13 at 9:41
    
oh i see...... thanks Dr evil..... i have looked at the CP and the max. number allowed at present is 10. what do you think is a safe value to set it to, without causing any problems elsewhere?? –  jason Jun 10 '13 at 9:52
    
This setting only causes server to ban host after N errors. But you still need to find a reason of getting such errors. Errors could be caused by long queryes (over max-wait-time), for example. –  dr-evil Jun 10 '13 at 10:08
    
Also, check your mysql error log. –  dr-evil Jun 10 '13 at 10:10

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.