Ticket #967 (new enhancement)

Opened 1 year ago

Last modified 2 months ago

request-queue-limit option for mod_fastcgi

Reported by: Curt Sampson <cjs@cynic.net> Assigned to: jan
Priority: high Milestone:
Component: mod_fastcgi Version: 1.4.19
Severity: normal Keywords:
Cc: Blocking:
Need Feedback: 0

Description

Ticket #399 (FastCGI performance on high load) does a good job of describing the problem. In short, Lighttpd queues all requests going to a fastcgi server (or group of processes), and if the offerered load is higher than the server can handle, new requests are delayed more and more while old requests for which we can no longer send a response are processed.

This patch gives a simple alternative solution to the problem: set the request-queue-limit option for that server, and when lighttpd recieves a request that would be processed by that server, but that server already has more than request-queue-limit processes queued up, lighttpd itself simply returns a 503 instead of queuing the new request. This ensures that at least some requests will be satisified by the fastcgi server, rather than letting the server get into a backlog situation where no requests are satisified because the user has given up by the time the server gets around to processing his request.

I'd suggest that this patch go into the next 1.4 release, since it's minimally invasive, and easily removed once a better solution is available.

Attachments

mod_fastcgi.patch.4424 (3.0 kB) - added by Curt Sampson <cjs@cynic.net> on 01/07/2007 10:01:18 AM.
request-queue-limit.patch (3.0 kB) - added by Tom Fernandes <anyaddress@gmx.net> on 03/19/2008 09:32:51 PM.
mod_fastcgi.patch (3.0 kB) - added by Tom Fernandes <anyaddress@gmx.net> on 03/19/2008 09:38:51 PM.
modified patch to work with 1.4.19 debian version

Change History

01/07/2007 10:01:18 AM changed by Curt Sampson <cjs@cynic.net>

  • attachment mod_fastcgi.patch.4424 added.

03/19/2008 09:29:17 PM changed by Tom Fernandes <anyaddress@gmx.net>

  • version changed from 1.4.13 to 1.4.19.
  • blocking changed.
  • pending changed.

I modified the patch to work with 1.4.19 Debian package. Should also work with other distros / upstream lighttpd though.

Just copy it into debian/patches/20_request-queue-limit.patch and add the name to debian/patches/series

03/19/2008 09:32:51 PM changed by Tom Fernandes <anyaddress@gmx.net>

  • attachment request-queue-limit.patch added.

03/19/2008 09:38:51 PM changed by Tom Fernandes <anyaddress@gmx.net>

  • attachment mod_fastcgi.patch added.

modified patch to work with 1.4.19 debian version


Add/Change #967 (request-queue-limit option for mod_fastcgi)




Change Properties