Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm getting intermittent errors in my Apache error_log like this:

sql[10315]: mysql_connect() [<a href='function.mysql-connect'>function.mysql-connect</a>]: Connection timed out - /page.html -
sql[10315]: Failed to connect to db:  - /page.html -
sql[9191]: mysql_connect() [<a href='function.mysql-connect'>function.mysql-connect</a>]: [2002] Connection timed out (trying to connect via tcp:// - /page.html

I can ping (which is defined in my /etc/hosts file), I can telnet to on port 3306. I can even use the cli mysql client using "mysql -h -p"

There are no rules in iptables and I can't see any packets being dropped on the NIC on ifconfig. There are no firewalls between this server and the database server.

This is 1 of 6 webservers we use to serve our website, the other 5 are not showing the same errors.

Is there anywhere else I can check for problems?

share|improve this question
up vote 0 down vote accepted

I ended up restarting the server which fixed the problem. I thinking it's probably a hardware fault with our backlink network. If it happens again I'll try and narrow it down by disabling network interfaces and bringing them back up.

share|improve this answer

Your Answer


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.