From 6bd8c6732e7ccda0013a3373c3618fca91c91d36 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Tue, 9 Oct 2012 17:03:52 -0400 Subject: add cgi_overload_delay tunable Try to avoid a situation in which so many ikiwiki cgi wrapper programs are running, all waiting on some long-running thing like a site rebuild, that it prevents the web server from doing anything else. The current approach only avoids this problem for GET requests; if multiple cgi's run GETs on a site at the same time, one will display a "please wait" page for a configurable number of seconds, which then redirects to retry. To enable this protection, set cgi_overload_delay to the number of seconds to wait. This is not enabled by default. --- IkiWiki.pm | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'IkiWiki.pm') diff --git a/IkiWiki.pm b/IkiWiki.pm index f68797ae3..a7dc6b36b 100644 --- a/IkiWiki.pm +++ b/IkiWiki.pm @@ -118,6 +118,14 @@ sub getsetup () { safe => 0, rebuild => 0, }, + cgi_overload_delay => { + type => "string", + default => '', + example => "10", + description => "number of seconds to delay CGI requests when overloaded", + safe => 1, + rebuild => 0, + }, rcs => { type => "string", default => '', -- cgit v1.2.3