avoid multiple ikiwiki cgi processes piling up, eating all memory, and thrashing
authorJoey Hess <joey@kodama.kitenet.net>
Tue, 11 Nov 2008 20:40:04 +0000 (15:40 -0500)
committerJoey Hess <joey@kodama.kitenet.net>
Tue, 11 Nov 2008 20:40:04 +0000 (15:40 -0500)
commit9a48669f1e9d83422781f6f175c3be8bce80cd26
treeb10fd39c79b1e82b154840d200c2f88e4ccb4412
parent6611f3a2d9eda262a07bb506b204e8bbf0728c38
avoid multiple ikiwiki cgi processes piling up, eating all memory, and thrashing

Fixed by making the cgi wrapper wait on a cgilock.
If you had to set apache's MaxClients low to avoid ikiwiki thrashing
your server, you can now turn it up to a high value.

The downside to this is that a cgi call that doesn't need to call lockwiki
will be serialised by this so only one can run at a time. (For example,
do=search.) There are few such calls, and all of them call loadindex,
so each still eats gobs of memory, so serialising them still seems ok.
IkiWiki/Wrapper.pm