LP#1919502 C listener backlog loop speedbump
authorBill Erickson <berickxx@gmail.com>
Wed, 13 May 2020 17:55:43 +0000 (13:55 -0400)
committerGalen Charlton <gmc@equinoxOLI.org>
Thu, 2 Dec 2021 21:27:52 +0000 (16:27 -0500)
commit5b950d18ff5402b275f9fe0d8e20b51545743a49
treeaaf9f4edd8dd6d9a0268f26a55c32b9a44e3085b
parent33d47537fc521bd83be18c12a8e0e61d8f8bbaec
LP#1919502 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>
Signed-off-by: Galen Charlton <gmc@equinoxOLI.org>
src/libopensrf/osrf_prefork.c