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.

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://db1.domain.com:3306) - /page.html

I can ping db1.domain.com (which is defined in my /etc/hosts file), I can telnet to db1.domain.com on port 3306. I can even use the cli mysql client using "mysql -h db1.domain.com -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

1 Answer 1

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

 
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.