<feed xmlns='http://www.w3.org/2005/Atom'>
<title>nginx.git, branch release-1.19.2</title>
<subtitle>nginx</subtitle>
<link rel='alternate' type='text/html' href='https://git.sigsegv.uk/nginx.git/'/>
<entry>
<title>nginx-1.19.2-RELEASE</title>
<updated>2020-08-11T14:52:30+00:00</updated>
<author>
<name>Maxim Dounin</name>
<email>mdounin@mdounin.ru</email>
</author>
<published>2020-08-11T14:52:30+00:00</published>
<link rel='alternate' type='text/html' href='https://git.sigsegv.uk/nginx.git/commit/?id=e4c6918e0869f64d115c032c117481b93be2c91f'/>
<id>e4c6918e0869f64d115c032c117481b93be2c91f</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Core: reusing connections in advance.</title>
<updated>2020-08-10T15:53:07+00:00</updated>
<author>
<name>Maxim Dounin</name>
<email>mdounin@mdounin.ru</email>
</author>
<published>2020-08-10T15:53:07+00:00</published>
<link rel='alternate' type='text/html' href='https://git.sigsegv.uk/nginx.git/commit/?id=348bc94086d94f27dbda5904174cd379bce7f931'/>
<id>348bc94086d94f27dbda5904174cd379bce7f931</id>
<content type='text'>
Reworked connections reuse, so closing connections is attempted in
advance, as long as number of free connections is less than 1/16 of
worker connections configured.  This ensures that new connections can
be handled even if closing a reusable connection requires some time,
for example, for a lingering close (ticket #2017).

The 1/16 ratio is selected to be smaller than 1/8 used for disabling
accept when working with accept mutex, so nginx will try to balance
new connections to different workers first, and will start reusing
connections only if this won't help.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Reworked connections reuse, so closing connections is attempted in
advance, as long as number of free connections is less than 1/16 of
worker connections configured.  This ensures that new connections can
be handled even if closing a reusable connection requires some time,
for example, for a lingering close (ticket #2017).

The 1/16 ratio is selected to be smaller than 1/8 used for disabling
accept when working with accept mutex, so nginx will try to balance
new connections to different workers first, and will start reusing
connections only if this won't help.
</pre>
</div>
</content>
</entry>
<entry>
<title>Core: added a warning about reusing connections.</title>
<updated>2020-08-10T15:52:59+00:00</updated>
<author>
<name>Maxim Dounin</name>
<email>mdounin@mdounin.ru</email>
</author>
<published>2020-08-10T15:52:59+00:00</published>
<link rel='alternate' type='text/html' href='https://git.sigsegv.uk/nginx.git/commit/?id=e240d88d4497afd2493358e938f74486750bc776'/>
<id>e240d88d4497afd2493358e938f74486750bc776</id>
<content type='text'>
Previously, reusing connections happened silently and was only
visible in monitoring systems.  This was shown to be not very user-friendly,
and administrators often didn't realize there were too few connections
available to withstand the load, and configured timeouts (keepalive_timeout
and http2_idle_timeout) were effectively reduced to keep things running.

To provide at least some information about this, a warning is now logged
(at most once per second, to avoid flooding the logs).
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Previously, reusing connections happened silently and was only
visible in monitoring systems.  This was shown to be not very user-friendly,
and administrators often didn't realize there were too few connections
available to withstand the load, and configured timeouts (keepalive_timeout
and http2_idle_timeout) were effectively reduced to keep things running.

To provide at least some information about this, a warning is now logged
(at most once per second, to avoid flooding the logs).
</pre>
</div>
</content>
</entry>
<entry>
<title>SSL: disabled sending shutdown after ngx_http_test_reading().</title>
<updated>2020-08-10T15:52:34+00:00</updated>
<author>
<name>Maxim Dounin</name>
<email>mdounin@mdounin.ru</email>
</author>
<published>2020-08-10T15:52:34+00:00</published>
<link rel='alternate' type='text/html' href='https://git.sigsegv.uk/nginx.git/commit/?id=eae2b2fdf15c52f058c0c08763a5c373997d0535'/>
<id>eae2b2fdf15c52f058c0c08763a5c373997d0535</id>
<content type='text'>
Sending shutdown when ngx_http_test_reading() detects the connection is
closed can result in "SSL_shutdown() failed (SSL: ... bad write retry)"
critical log messages if there are blocked writes.

Fix is to avoid sending shutdown via the c-&gt;ssl-&gt;no_send_shutdown flag,
similarly to how it is done in ngx_http_keepalive_handler() for kqueue
when pending EOF is detected.

Reported by Jan Prachař
(http://mailman.nginx.org/pipermail/nginx-devel/2018-December/011702.html).
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Sending shutdown when ngx_http_test_reading() detects the connection is
closed can result in "SSL_shutdown() failed (SSL: ... bad write retry)"
critical log messages if there are blocked writes.

Fix is to avoid sending shutdown via the c-&gt;ssl-&gt;no_send_shutdown flag,
similarly to how it is done in ngx_http_keepalive_handler() for kqueue
when pending EOF is detected.

Reported by Jan Prachař
(http://mailman.nginx.org/pipermail/nginx-devel/2018-December/011702.html).
</pre>
</div>
</content>
</entry>
<entry>
<title>HTTP/2: fixed c-&gt;timedout flag on timed out connections.</title>
<updated>2020-08-10T15:52:20+00:00</updated>
<author>
<name>Maxim Dounin</name>
<email>mdounin@mdounin.ru</email>
</author>
<published>2020-08-10T15:52:20+00:00</published>
<link rel='alternate' type='text/html' href='https://git.sigsegv.uk/nginx.git/commit/?id=1d696cd37947ef816bde4d54d7b6f97374f1151d'/>
<id>1d696cd37947ef816bde4d54d7b6f97374f1151d</id>
<content type='text'>
Without the flag, SSL shutdown is attempted on such connections,
resulting in useless work and/or bogus "SSL_shutdown() failed
(SSL: ... bad write retry)" critical log messages if there are
blocked writes.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Without the flag, SSL shutdown is attempted on such connections,
resulting in useless work and/or bogus "SSL_shutdown() failed
(SSL: ... bad write retry)" critical log messages if there are
blocked writes.
</pre>
</div>
</content>
</entry>
<entry>
<title>SSL: fixed shutdown handling.</title>
<updated>2020-08-10T15:52:09+00:00</updated>
<author>
<name>Maxim Dounin</name>
<email>mdounin@mdounin.ru</email>
</author>
<published>2020-08-10T15:52:09+00:00</published>
<link rel='alternate' type='text/html' href='https://git.sigsegv.uk/nginx.git/commit/?id=e01cdfbd8c1b757eaadad059cb7c9b9313e715a6'/>
<id>e01cdfbd8c1b757eaadad059cb7c9b9313e715a6</id>
<content type='text'>
Previously, bidirectional shutdown never worked, due to two issues
in the code:

1. The code only tested SSL_ERROR_WANT_READ and SSL_ERROR_WANT_WRITE
   when there was an error in the error queue, which cannot happen.
   The bug was introduced in an attempt to fix unexpected error logging
   as reported with OpenSSL 0.9.8g
   (http://mailman.nginx.org/pipermail/nginx/2008-January/003084.html).

2. The code never called SSL_shutdown() for the second time to wait for
   the peer's close_notify alert.

This change fixes both issues.

Note that after this change bidirectional shutdown is expected to work for
the first time, so c-&gt;ssl-&gt;no_wait_shutdown now makes a difference.  This
is not a problem for HTTP code which always uses c-&gt;ssl-&gt;no_wait_shutdown,
but might be a problem for stream and mail code, as well as 3rd party
modules.

To minimize the effect of the change, the timeout, which was used to be 30
seconds and not configurable, though never actually used, is now set to
3 seconds.  It is also expanded to apply to both SSL_ERROR_WANT_READ and
SSL_ERROR_WANT_WRITE, so timeout is properly set if writing to the socket
buffer is not possible.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Previously, bidirectional shutdown never worked, due to two issues
in the code:

1. The code only tested SSL_ERROR_WANT_READ and SSL_ERROR_WANT_WRITE
   when there was an error in the error queue, which cannot happen.
   The bug was introduced in an attempt to fix unexpected error logging
   as reported with OpenSSL 0.9.8g
   (http://mailman.nginx.org/pipermail/nginx/2008-January/003084.html).

2. The code never called SSL_shutdown() for the second time to wait for
   the peer's close_notify alert.

This change fixes both issues.

Note that after this change bidirectional shutdown is expected to work for
the first time, so c-&gt;ssl-&gt;no_wait_shutdown now makes a difference.  This
is not a problem for HTTP code which always uses c-&gt;ssl-&gt;no_wait_shutdown,
but might be a problem for stream and mail code, as well as 3rd party
modules.

To minimize the effect of the change, the timeout, which was used to be 30
seconds and not configurable, though never actually used, is now set to
3 seconds.  It is also expanded to apply to both SSL_ERROR_WANT_READ and
SSL_ERROR_WANT_WRITE, so timeout is properly set if writing to the socket
buffer is not possible.
</pre>
</div>
</content>
</entry>
<entry>
<title>Request body: optimized handling of small chunks.</title>
<updated>2020-08-06T02:02:57+00:00</updated>
<author>
<name>Maxim Dounin</name>
<email>mdounin@mdounin.ru</email>
</author>
<published>2020-08-06T02:02:57+00:00</published>
<link rel='alternate' type='text/html' href='https://git.sigsegv.uk/nginx.git/commit/?id=130a5e71269200154b55e85d9e30186feaeb64a7'/>
<id>130a5e71269200154b55e85d9e30186feaeb64a7</id>
<content type='text'>
If there is a previous buffer, copy small chunks into it instead of
allocating additional buffer.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
If there is a previous buffer, copy small chunks into it instead of
allocating additional buffer.
</pre>
</div>
</content>
</entry>
<entry>
<title>Request body: allowed large reads on chunk boundaries.</title>
<updated>2020-08-06T02:02:55+00:00</updated>
<author>
<name>Maxim Dounin</name>
<email>mdounin@mdounin.ru</email>
</author>
<published>2020-08-06T02:02:55+00:00</published>
<link rel='alternate' type='text/html' href='https://git.sigsegv.uk/nginx.git/commit/?id=150cbb017b4fda599dcda172dca87ca11f6219f1'/>
<id>150cbb017b4fda599dcda172dca87ca11f6219f1</id>
<content type='text'>
If some additional data from a pipelined request happens to be
read into the body buffer, we copy it to r-&gt;header_in or allocate
an additional large client header buffer for it.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
If some additional data from a pipelined request happens to be
read into the body buffer, we copy it to r-&gt;header_in or allocate
an additional large client header buffer for it.
</pre>
</div>
</content>
</entry>
<entry>
<title>Request body: all read data are now sent to filters.</title>
<updated>2020-08-06T02:02:44+00:00</updated>
<author>
<name>Maxim Dounin</name>
<email>mdounin@mdounin.ru</email>
</author>
<published>2020-08-06T02:02:44+00:00</published>
<link rel='alternate' type='text/html' href='https://git.sigsegv.uk/nginx.git/commit/?id=9edc93fe0ed60bac336d11f7d20d3c2ed9db3227'/>
<id>9edc93fe0ed60bac336d11f7d20d3c2ed9db3227</id>
<content type='text'>
This is a prerequisite for the next change to allow large reads
on chunk boundaries.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This is a prerequisite for the next change to allow large reads
on chunk boundaries.
</pre>
</div>
</content>
</entry>
<entry>
<title>Added size check to ngx_http_alloc_large_header_buffer().</title>
<updated>2020-08-06T02:02:22+00:00</updated>
<author>
<name>Maxim Dounin</name>
<email>mdounin@mdounin.ru</email>
</author>
<published>2020-08-06T02:02:22+00:00</published>
<link rel='alternate' type='text/html' href='https://git.sigsegv.uk/nginx.git/commit/?id=bd7dad5b0eb9f667a9c66ea5175a017ac51cd027'/>
<id>bd7dad5b0eb9f667a9c66ea5175a017ac51cd027</id>
<content type='text'>
This ensures that copying won't write more than the buffer size
even if the buffer comes from hc-&gt;free and it is smaller than the large
client header buffer size in the virtual host configuration.  This might
happen if size of large client header buffers is different in name-based
virtual hosts, similarly to the problem with number of buffers fixed
in 6926:e662cbf1b932.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This ensures that copying won't write more than the buffer size
even if the buffer comes from hc-&gt;free and it is smaller than the large
client header buffer size in the virtual host configuration.  This might
happen if size of large client header buffers is different in name-based
virtual hosts, similarly to the problem with number of buffers fixed
in 6926:e662cbf1b932.
</pre>
</div>
</content>
</entry>
</feed>
