Note I've opened an ASF Bugzilla bug report about this mod_cgi TimeOut handling: https://bz.apache.org/bugzilla/show_bug.cgi?id=64709
David Cook Software Engineer Prosentient Systems 72/330 Wattle St Ultimo, NSW 2007 Australia Office: 02 9212 0899 Online: 02 8005 0595 From: Koha-devel <[email protected]> On Behalf Of [email protected] Sent: Friday, 4 September 2020 12:38 PM To: 'koha-devel' <[email protected]> Cc: 'Kyle Hall' <[email protected]>; 'Tomas Cohen Arazi' <[email protected]> Subject: [Koha-devel] Apache directive TimeOut works differently when using mod_cgi (CGI) vs mod_proxy_http (Plack) Hi all, While troubleshooting Apache TimeOut for Plack vs CGI (https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26128), I discovered that Apache seems to respect TimeOut when measuring a timeout proxying requests to Plack. However, it actually *doubles* the time when running CGI scripts on its own. I've looked through the Apache httpd and apr source code, and it's not obvious to me at a glance why this happens, but I think it's important for us to realize this, because it means the solution presented by "Make processes that rely on background jobs run in CGI mode" https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15218 might not always be necessary. Based on my investigation, it seems the reason some scripts work in CGI but not in Plack is simply because of the different way timeouts occur. If we just raise the ProxyTimeout to twice the value of TimeOut (ie change it to 600 to be 2*TimeOut), then we'll be getting the same behaviour. Of course, the real solution in these cases is still to use asynchronous processing via "Add a task queue" (https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22417). In any case, I thought it was important to share my findings, because it means we might actually be able to reduce our dependency on CGI now even before Bug 22417 is pushed. Thank you, David Cook Software Engineer Prosentient Systems 72/330 Wattle St Ultimo, NSW 2007 Australia Office: 02 9212 0899 Online: 02 8005 0595
_______________________________________________ Koha-devel mailing list [email protected] https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-devel website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
