<feed xmlns='http://www.w3.org/2005/Atom'>
<title>nginx.git/src/event, branch release-1.1.5</title>
<subtitle>nginx</subtitle>
<link rel='alternate' type='text/html' href='https://git.sigsegv.uk/nginx.git/'/>
<entry>
<title>Fixed loss of chain links in ngx_event_pipe_read_upstream().</title>
<updated>2011-09-20T09:56:35+00:00</updated>
<author>
<name>Maxim Dounin</name>
<email>mdounin@mdounin.ru</email>
</author>
<published>2011-09-20T09:56:35+00:00</published>
<link rel='alternate' type='text/html' href='https://git.sigsegv.uk/nginx.git/commit/?id=265e51aa0b65fe8ba456224b95659b2612e0fc6d'/>
<id>265e51aa0b65fe8ba456224b95659b2612e0fc6d</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Fix of cpu hog in event pipe.</title>
<updated>2011-09-20T09:55:27+00:00</updated>
<author>
<name>Maxim Dounin</name>
<email>mdounin@mdounin.ru</email>
</author>
<published>2011-09-20T09:55:27+00:00</published>
<link rel='alternate' type='text/html' href='https://git.sigsegv.uk/nginx.git/commit/?id=e4dab80e802241e416170b9686d8484eaa1f90f4'/>
<id>e4dab80e802241e416170b9686d8484eaa1f90f4</id>
<content type='text'>
If client closed connection in ngx_event_pipe_write_to_downstream(), buffers
in the "out" chain were lost.  This caused cpu hog if all available buffers
were in the "out" chain.  Fix is to call ngx_chain_update_chains() before
checking return code of output filter to avoid loosing buffers in the "out"
chain.

Note that this situation (all available buffers in the "out" chain) isn't
normal, it should be prevented by busy buffers limit.  Though right now it
may happen with complex protocols like fastcgi.  This should be addressed
separately.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
If client closed connection in ngx_event_pipe_write_to_downstream(), buffers
in the "out" chain were lost.  This caused cpu hog if all available buffers
were in the "out" chain.  Fix is to call ngx_chain_update_chains() before
checking return code of output filter to avoid loosing buffers in the "out"
chain.

Note that this situation (all available buffers in the "out" chain) isn't
normal, it should be prevented by busy buffers limit.  Though right now it
may happen with complex protocols like fastcgi.  This should be addressed
separately.
</pre>
</div>
</content>
</entry>
<entry>
<title>The "worker_aio_requests" directive.</title>
<updated>2011-09-20T07:30:09+00:00</updated>
<author>
<name>Igor Sysoev</name>
<email>igor@sysoev.ru</email>
</author>
<published>2011-09-20T07:30:09+00:00</published>
<link rel='alternate' type='text/html' href='https://git.sigsegv.uk/nginx.git/commit/?id=c8df23cb29146c1dfca82141e19b1049b1fc1011'/>
<id>c8df23cb29146c1dfca82141e19b1049b1fc1011</id>
<content type='text'>
The default value is 32 AIO simultaneous requests per worker. Previously
they were hardcoded to 1024, and it was too large, since Linux allocated
them early on io_setup(), but not on request itself. So with default value
of /proc/sys/fs/aio-max-nr equal to 65536 only 64 worker processes could
be run simultaneously. 32 AIO requests are enough for modern disks even if
server runs only 1 worker.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The default value is 32 AIO simultaneous requests per worker. Previously
they were hardcoded to 1024, and it was too large, since Linux allocated
them early on io_setup(), but not on request itself. So with default value
of /proc/sys/fs/aio-max-nr equal to 65536 only 64 worker processes could
be run simultaneously. 32 AIO requests are enough for modern disks even if
server runs only 1 worker.
</pre>
</div>
</content>
</entry>
<entry>
<title>Replaced "can not" with "cannot" and "could not" in a bunch of places.</title>
<updated>2011-09-19T14:48:29+00:00</updated>
<author>
<name>Ruslan Ermilov</name>
<email>ru@nginx.com</email>
</author>
<published>2011-09-19T14:48:29+00:00</published>
<link rel='alternate' type='text/html' href='https://git.sigsegv.uk/nginx.git/commit/?id=a823c550e45bb653c5d660cceaea3f153b3b28e8'/>
<id>a823c550e45bb653c5d660cceaea3f153b3b28e8</id>
<content type='text'>
Fixed nearby grammar errors.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Fixed nearby grammar errors.
</pre>
</div>
</content>
</entry>
<entry>
<title>Fixing Linux AIO initiatialization: AIO operations are disabled if kernel</title>
<updated>2011-09-16T13:41:52+00:00</updated>
<author>
<name>Igor Sysoev</name>
<email>igor@sysoev.ru</email>
</author>
<published>2011-09-16T13:41:52+00:00</published>
<link rel='alternate' type='text/html' href='https://git.sigsegv.uk/nginx.git/commit/?id=aa997c02895d184e376da0f94b53907ef21b204b'/>
<id>aa997c02895d184e376da0f94b53907ef21b204b</id>
<content type='text'>
does not support them.  Previously worker just exited.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
does not support them.  Previously worker just exited.
</pre>
</div>
</content>
</entry>
<entry>
<title>Fixing Linux AIO syscalls return value handling:</title>
<updated>2011-09-16T12:43:16+00:00</updated>
<author>
<name>Igor Sysoev</name>
<email>igor@sysoev.ru</email>
</author>
<published>2011-09-16T12:43:16+00:00</published>
<link rel='alternate' type='text/html' href='https://git.sigsegv.uk/nginx.git/commit/?id=4134b48b68c29536d59521d8f8d156967f0e8a8b'/>
<id>4134b48b68c29536d59521d8f8d156967f0e8a8b</id>
<content type='text'>
syscall(2) uses usual libc convention, it returns -1 on error and
sets errno. Obsolete _syscall(2) returns negative value of error.

Thanks to Hagai Avrahami.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
syscall(2) uses usual libc convention, it returns -1 on error and
sets errno. Obsolete _syscall(2) returns negative value of error.

Thanks to Hagai Avrahami.
</pre>
</div>
</content>
</entry>
<entry>
<title>Upstream: pipe length and input_filter_init in buffered mode.</title>
<updated>2011-09-15T19:00:47+00:00</updated>
<author>
<name>Maxim Dounin</name>
<email>mdounin@mdounin.ru</email>
</author>
<published>2011-09-15T19:00:47+00:00</published>
<link rel='alternate' type='text/html' href='https://git.sigsegv.uk/nginx.git/commit/?id=a746bab7c113840246159a805e544457161c1d86'/>
<id>a746bab7c113840246159a805e544457161c1d86</id>
<content type='text'>
As long as ngx_event_pipe() has more data read from upstream than specified
in p-&gt;length it's passed to input filter even if buffer isn't yet full.  This
allows to process data with known length without relying on connection close
to signal data end.

By default p-&gt;length is set to -1 in upstream module, i.e. end of data is
indicated by connection close.  To set it from per-protocol handlers upstream
input_filter_init() now called in buffered mode (as well as in
unbuffered mode).
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
As long as ngx_event_pipe() has more data read from upstream than specified
in p-&gt;length it's passed to input filter even if buffer isn't yet full.  This
allows to process data with known length without relying on connection close
to signal data end.

By default p-&gt;length is set to -1 in upstream module, i.e. end of data is
indicated by connection close.  To set it from per-protocol handlers upstream
input_filter_init() now called in buffered mode (as well as in
unbuffered mode).
</pre>
</div>
</content>
</entry>
<entry>
<title>API change: ngx_chain_update_chains() now requires pool.</title>
<updated>2011-09-15T16:03:17+00:00</updated>
<author>
<name>Maxim Dounin</name>
<email>mdounin@mdounin.ru</email>
</author>
<published>2011-09-15T16:03:17+00:00</published>
<link rel='alternate' type='text/html' href='https://git.sigsegv.uk/nginx.git/commit/?id=d7c2673d3ffb5c8c7c994a3ee385997237ed0d99'/>
<id>d7c2673d3ffb5c8c7c994a3ee385997237ed0d99</id>
<content type='text'>
The ngx_chain_update_chains() needs pool to free chain links used for buffers
with non-matching tags.  Providing one helps to reduce memory consumption
for long-lived requests.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The ngx_chain_update_chains() needs pool to free chain links used for buffers
with non-matching tags.  Providing one helps to reduce memory consumption
for long-lived requests.
</pre>
</div>
</content>
</entry>
<entry>
<title>Proper setting of read-&gt;eof in pipe code.</title>
<updated>2011-09-01T15:10:41+00:00</updated>
<author>
<name>Maxim Dounin</name>
<email>mdounin@mdounin.ru</email>
</author>
<published>2011-09-01T15:10:41+00:00</published>
<link rel='alternate' type='text/html' href='https://git.sigsegv.uk/nginx.git/commit/?id=82854d0d78a24fcbcf16dbf486cf60421f73096b'/>
<id>82854d0d78a24fcbcf16dbf486cf60421f73096b</id>
<content type='text'>
Setting read-&gt;eof to 0 seems to be just a typo.  It appeared in
nginx-0.0.1-2003-10-28-18:45:41 import (r164), while identical code in
ngx_recv.c introduced in the same import do actually set read-&gt;eof to 1.

Failure to set read-&gt;eof to 1 results in EOF not being generally detectable
from connection flags.  On the other hand, kqueue won't report any read
events on such a connection since we use EV_CLEAR.  This resulted in read
timeouts if such connection was cached and used for another request.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Setting read-&gt;eof to 0 seems to be just a typo.  It appeared in
nginx-0.0.1-2003-10-28-18:45:41 import (r164), while identical code in
ngx_recv.c introduced in the same import do actually set read-&gt;eof to 1.

Failure to set read-&gt;eof to 1 results in EOF not being generally detectable
from connection flags.  On the other hand, kqueue won't report any read
events on such a connection since we use EV_CLEAR.  This resulted in read
timeouts if such connection was cached and used for another request.
</pre>
</div>
</content>
</entry>
<entry>
<title>Proper SSL shutdown handling.</title>
<updated>2011-09-01T13:49:36+00:00</updated>
<author>
<name>Maxim Dounin</name>
<email>mdounin@mdounin.ru</email>
</author>
<published>2011-09-01T13:49:36+00:00</published>
<link rel='alternate' type='text/html' href='https://git.sigsegv.uk/nginx.git/commit/?id=a9e3c65d22ad68b994ad7046b243ae459b242ffa'/>
<id>a9e3c65d22ad68b994ad7046b243ae459b242ffa</id>
<content type='text'>
If connection has unsent alerts, SSL_shutdown() tries to send them even
if SSL_set_shutdown(SSL_RECEIVED_SHUTDOWN|SSL_SENT_SHUTDOWN) was used.
This can be prevented by SSL_set_quiet_shutdown().  SSL_set_shutdown()
is required nevertheless to preserve session.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
If connection has unsent alerts, SSL_shutdown() tries to send them even
if SSL_set_shutdown(SSL_RECEIVED_SHUTDOWN|SSL_SENT_SHUTDOWN) was used.
This can be prevented by SSL_set_quiet_shutdown().  SSL_set_shutdown()
is required nevertheless to preserve session.
</pre>
</div>
</content>
</entry>
</feed>
