Amazon Elastic Load Balancer (ELB) performs periodic health checks:
In addition to the health check you configure for your load balancer, a second health check is performed by the service to protect against potential side-effects caused by instances being terminated without being deregistered. To perform this check, the load balancer opens a TCP connection on the same port that the health check is configured to use, and then closes the connection after the health check is completed.
nginx logs these events with a 400 error, which happen many times per minutes:
[07/Aug/2013:18:32:27 +0000] "-" 0.000 400 0 "-" "-" "-"
how can I configure nginx to not log these events?
The solution is to not use legacy unsupported versions of nginx. Starting from version 1.3.15 (pretty old one), nginx does not log the 400 errors in such cases.
See changelog for information: http://nginx.org/en/CHANGES
*) Change: opening and closing a connection without sending any data in it is no longer logged to access_log with error code 400.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With