LP1881001 C listener backlog loop speedbump user/berick/lp1881001-c-backlog-speedbump
authorBill Erickson <berickxx@gmail.com>
Wed, 13 May 2020 17:55:43 +0000 (13:55 -0400)
committerBill Erickson <berickxx@gmail.com>
Thu, 28 May 2020 15:30:50 +0000 (11:30 -0400)
commite1e78c7a55dd7cb85253c9eabdad89e45a83ce91
tree5460b1e7a56f18bd8740d959321d30c38e0124e7
parentdeee3d88a38c53d3750f4cca44fc1920421c1907
LP1881001 C listener backlog loop speedbump

When the request backlog contains items in the C forking code, attempts
to process the request run in a tight loop without stopping until the
backlog is once again empty.  This can lead to spewing "Could not launch
a new child" warning messages at a high rate, saturating log files.

This commit adds a 1 second speed bump between backlog processing loops
to allow time for drones to complete their task and start processing the
remaining queued requests.  The delay has a secondary affect of limited
the speed of the warning log spewing.

This 1-second speedbump logic matches that of the Perl code.

Signed-off-by: Bill Erickson <berickxx@gmail.com>
src/libopensrf/osrf_prefork.c