Welcome! Log In Create A New Profile

Advanced

NGinx Load Balancer / Apache Backend / HTTP 499

Posted by ph25sl 
NGinx Load Balancer / Apache Backend / HTTP 499
November 13, 2015 04:18PM
Hi All,

I have NGinx configured as a Load Balancer with Apache servers at the backend serving a PHP application. We use 'Pingdom.com' for external application monitoring. I noticed several "outages" rarely lasting more than the minute between checks.

I added some additional logging as detailed here: https://www.nginx.com/resources/admin-guide/logging-and-monitoring

--nginx access log
108.62.115.226 - - [13/Nov/2015:20:11:03 +0000] "GET //login/index.php HTTP/1.1" 499 0 "-" "Pingdom.com_bot_version_1.4_(http://www.pingdom.com/)"rt=30.031 uht="-" urt="-"

On checking each of the Apache backend I found:
108.62.115.226 - - [13/Nov/2015:20:10:33 +0000] "GET //login/index.php HTTP/1.0" 200 6968

The interesting part here is that the Apache backend log entry is 30 seconds *before* the NGinx log entry. I guess the order of the process is
- Nginx passes request to backend but doesn't log it
- Apache deals with it and responds
- However NGinx doesn't receive it
- Pingdom closes the connection which results in the HTTP 499 which is logged in the NGinx log.

The clocks are in sync via NTP and I've manually verified they're not out of time with a `date` on the CLI.

What I'd like to gain some insight into is why NGinx doesn't appear to receive the response. It appears that Apache is responding fine and many of the help articles I've read seems to indicate that the backend is usally at fault but this doesn't appear to be the case here.

Any help would be greatly appreciated.

Thanks!
Re: NGinx Load Balancer / Apache Backend / HTTP 499
November 13, 2015 05:16PM
You might get more logging results by using debug, any request send to a backend always gets logged so with debug logging you should see alot more happening.

---
nginx for Windows http://nginx-win.ecsds.eu/
Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 130
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready