diff options
author | Max Romanov <max.romanov@nginx.com> | 2020-12-18 00:25:27 +0300 |
---|---|---|
committer | Max Romanov <max.romanov@nginx.com> | 2020-12-18 00:25:27 +0300 |
commit | 7389a50835696fe256c5decf31bec129f1d59bbf (patch) | |
tree | c067cade372516da24d997c3955a639a61c5a223 /docs/changes.xml | |
parent | c0449e13f80312a2e09f643e1a69e536384eae79 (diff) | |
download | unit-7389a50835696fe256c5decf31bec129f1d59bbf.tar.gz unit-7389a50835696fe256c5decf31bec129f1d59bbf.tar.bz2 |
Limiting app queue notifications count in socket.
Under high load, a queue synchonization issue may occur, starting from the
steady state when an app queue message is dequeued immediately after it has been
enqueued. In this state, the router always puts the first message in the queue
and is forced to notify the app about a new message in an empty queue using a
socket pair. On the other hand, the application dequeues and processes the
message without reading the notification from the socket, so the socket buffer
overflows with notifications.
The issue was reproduced during Unit load tests. After a socket buffer
overflow, the router is unable to notify the app about a new first message.
When another message is enqueued, a notification is not required, so the queue
grows without being read by the app. As a result, request processing stops.
This patch changes the notification algorithm by counting the notifications in
the pipe instead of getting the number of messages in the queue.
Diffstat (limited to 'docs/changes.xml')
-rw-r--r-- | docs/changes.xml | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/docs/changes.xml b/docs/changes.xml index ca4ffe5f..f157e9bf 100644 --- a/docs/changes.xml +++ b/docs/changes.xml @@ -41,6 +41,13 @@ the router process could crash with multithreaded applications under high load. </para> </change> +<change type="bugfix"> +<para> +applications could stop processing new requests under high load; the bug had +appeared in 1.19.0. +</para> +</change> + </changes> |