5


Recently I moved my servers from one provider to the other and started to get this messages in apache error log: "request failed: error reading the headers"

Example from the error and corresponding access apache logs:

ApacheServer$ cat  error_log
ApacheServer [Tue Jan 20 11:07:44 2015] [error] [client x.x.x.x] request failed: error reading the headers

ApacheServer$ cat  access_log
x.x.x.x - - [20/Jan/2015:11:06:44 +0200] "GET SomeRandomRequest HTTP/1.1" 400 226 "-" "Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.3; WOW64; Trident/7.0; .NET4.0E; .NET4.0C; .NET CLR 3.5.30729; .NET CLR 2.0.50727; .NET CLR 3.0.30729; BRI/2; MAARJS)" "-"

I must admit that nothing is changed besides php version (from 5.3 to 5.4).
I don't see any relation to some specific browser or some specific request, it is totally random.
Also it can not be the switch problem because I have the same problem on my other apache servers that are not sharing same switch.

Till now I tried to:
- update network card driver
- raise RX from 256 to 4096 with: ethtool -G eth1 rx 4096
- bond second network card to the interface
- google this problem many times but didn't find the solution or same issue.

Server version: Apache/2.2.15-39 (Unix)
centos 6.5

1

This is probably a client problem, though why you didn't get it before I could not say.

The error is logged when a request is received by Apache that doesn't complete before the end of the headers section. So as a minimum Apache has receive the request line e.g. GET / HTTP/1.0 but has been sent a valid set of headers after this.

So it could either be no headers at all, or a bunch of headers without the blank line that indicates the boundary between the headers and the body of the request.

I guess it's possible the default PHP timeout may have been changed between your two installations, so that is worth checking, but really this is an indication of a bad (or slow) client making requests to your web server.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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