Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

getting lots of 408 status code in apache access log after migration from http to https

Tags:

apache

We are getting lots of 408 status code in apache access log and these are coming after migration from http to https .

Our web server is behind loadbalancer and we are using keepalive on and keepalivetimeout value is 15 sec.

Can someone please help to resolve this.

like image 643
Vinay Singh Avatar asked Aug 03 '26 11:08

Vinay Singh


1 Answers

Same problem here, after migration from http to https. Do not panic, it is not a bug but a client feature ;)

I suppose that you find these log entries only in the logs of the default (or alphabetically first) apache ssl conf and that you have a low timeout (<20).

As of my tests these are clients establishing pre-connected/speculative sockets to your web server for fast next page/resource load. Since they only establish the initial socket connection or handshake ( 150 bytes or few thousands) the connect to the ip and do not specify a vhost name, and got logged in the default/firs apache conf log.

After few secs from the initial connection they drop the socket if not needed or the use is for faster further request. If your timeout is lower than these few secs you get the 408 if is higher apache doesn't bother.

So either you ignore them / add a different default conf for apache, or you rise the timeout having more apache processes busy waiting from the client to drop or use the socket.

see https://bugs.chromium.org/p/chromium/issues/detail?id=85229 for some related discussions

like image 65
Andrea Avatar answered Aug 08 '26 08:08

Andrea



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!