LPXXX C listener backlog loop speedbump user/jeffdavis/lp1919502-c-backlog-speedbump
authorBill Erickson <berickxx@gmail.com>
Wed, 13 May 2020 17:55:43 +0000 (13:55 -0400)
committerJeff Davis <jeff.davis@bc.libraries.coop>
Wed, 17 Mar 2021 19:52:27 +0000 (12:52 -0700)
commit0eb06a101bd66a7022483924bd22058d02faf99c
tree5e961990ed4deb7ce04b7b927498391d44e598b3
parent4270ec3b6e4d9eb1b88e3c4ff718c1ccd858526c
LPXXX 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>
Signed-off-by: Jeff Davis <jeff.davis@bc.libraries.coop>
src/libopensrf/osrf_prefork.c