Linux – Apache Empty response Diognosis

apache-2.2connectionlinux

My server gives empty response randomly. This is about four weeks that I cant figure out what is the problem.
I will try my best to give you extensive information about my problem.

sever specs: centos 6, apache webserver,mysql database,php

1. The chance to get an empty response from server goes up when server traffic is higher

2. It takes a little time for sever to give out an empty response (about 2-10 seconds)

3.when I encounter this problem It lasts 20 seconds to 4 minute.

4. Server gives this empty response to specific ips. If I load website from another Ip, Website loads without any problem.

5. I sent a ticket to server provider (they are re-sellers of hetzner) and they say there is nothing wrong with network. (But I think maybe there is a bandwidth limit that is reaching out or some kind of firewall)

6. I turned of iptables and the problem persisted.

7. during the problem sometime it takes about 10 seconds for server to give out the empty response. During this 10 seconds if I restart httpd server. It gives out empty response right away.

8.I installed nginx beside apache on port 800 when server encounters this problem and gives out empty response on port 80. It still has the problem on port 800. and gives out connection reset.

9. server load is below 1

10. I can still connect to the server through ssh port while server gives out empty response

11. there is nothing in error log

Best Answer

To me this looks that a timeout occurs somewhere in your application due to high server load or some other reason. This timeout isn't handled correctly, and it returns an empty page to Apache.

This timeout could happen with a database query, application code, with an external request etc. A database problem can also cause this error, if the application doesn't handle the problem correctly. The fact that nothing appears doesn't exclude that from the possible causes.

Without knowing the details of your application architecture, it is impossible to give a more precise answer.