Welcome! Log In Create A New Profile

Advanced

nginx -s reload terminates connections

July 06, 2017 10:43PM
Hi,

Using the official 1.12.0 package on debian 9 and the 1.12.0 ports package on FreeBSD 11-RC1, calling nginx -s reload drops connections.

It's fairly easy to reproduce, I just install the fresh package from wherever, and serving the default index.html, I run wrk, and in the middle of the run I call 'nginx -s reload' without actually changing anything:

$ wrk -d 30 -c 100 -t 20 http://nginx-test01.lan/
Running 30s test @ http://nginx-test01.lan/
20 threads and 100 connections
Thread Stats Avg Stdev Max +/- Stdev
Latency 10.06ms 4.10ms 53.02ms 79.07%
Req/Sec 503.04 161.36 757.00 53.20%
300801 requests in 30.05s, 243.82MB read
Socket errors: connect 0, read 100, write 0, timeout 0
Requests/sec: 10008.67
Transfer/sec: 8.11MB

You can see 100 socket read errors in this example.

I tried this with the h2o (2.2.2) server just to see what happens and there is no error:

$ wrk -d 30 -c 100 -t 20 http://h2o-test01.lan/
Running 30s test @ http://nginx-test01.lan/
20 threads and 100 connections
Thread Stats Avg Stdev Max +/- Stdev
Latency 4.06ms 1.83ms 56.08ms 76.57%
Req/Sec 1.24k 724.32 6.61k 97.67%
741569 requests in 30.02s, 599.01MB read
Requests/sec: 24699.67
Transfer/sec: 19.95MB

--

The same issue occurs when I test HTTP/2 with 'h2load'. The h2load test just stops as soon as I call 'nginx -s reload'.

Is this expected behaviour? If so, is there some configuration directive that would fix it?

In my real world usage, I have a nginx server running on the edge and it proxies (HTTP/1.1) to a different nginx server. If I call 'nginx -s reload' on the internal nginx the external nginx shows "upstream prematurely closed connection while reading response header from upstream" if it's under heavy load.

Thanks!
Subject Author Posted

nginx -s reload terminates connections

rlx01 July 06, 2017 10:43PM

Re: nginx -s reload terminates connections

JackB July 07, 2017 01:30AM

Re: nginx -s reload terminates connections

rlx01 July 07, 2017 01:55AM

Re: nginx -s reload terminates connections

JackB July 07, 2017 05:49AM

Re: nginx -s reload terminates connections

Maxim Dounin July 07, 2017 08:30AM

Re: nginx -s reload terminates connections

rlx01 July 07, 2017 03:41PM

Re: nginx -s reload terminates connections

rlx01 July 07, 2017 05:28PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 76
Record Number of Users: 8 on December 15, 2016
Record Number of Guests: 386 on August 02, 2016
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready