With mod_fcgid I've observed a performance bottleneck in which concurrent
requests to a virtualhost where the number of concurrent requests exceed
the number of available fcgid-spawned processes result in a significant
delay in responding to requests.

Details of this situation, how to reproduce, various scenarios tried, etc
are detailed in the issue submission [1].

In file  modules/fcgid/fcgid_bridge.c, there is this section of code:

            if (i > 0 || j > 0 || count_busy_processes(r, &fcgi_request)) {

If I change the sleep time from 1 second to 0 seconds (or, comment out
this section of code entirely), the bottleneck goes away.  It seems like
the more appropriate action here would be to turn the sleep time into a
configurable value, with the current 1s value as the default.

I presume this code is meant to be a way to help defer spawn requests so
that a server is not over-whelmed with spin-up related I/O.

My questions are:
- Is this intended to be a throttling mechanism and if so, is there a more
efficient way to handle this throttling?
- If I outright reduce that sleep delay to 0 (or comment out this code),
what potential or expected problems am I introducing to mod_fcgid?

[1] https://issues.apache.org/bugzilla/show_bug.cgi?id=53693

Mike M

You can't learn in school what the world is going to do next year.

Reply via email to