On Fri, Nov 5, 2010 at 9:36 AM, YorHel <yorhel@xxxxxxxxx> wrote: > Hello, > > I am considering migrating my sites from Lighttpd to Apache. And while > migrating the configuration went fine on my test server (using > mod_fcgid), there's one problem I have been unable to solve. > > Lighttpd buffers the entire HTTP request in memory before passing it > to the content generator (which runs as plain CGI or FastCGI), and > buffers the entire HTTP response in case the client connection is not > fast enough. My FastCGI applications are written to process requests > as fast as possible (usually within 100ms, pages that take longer than > 500ms are very rare) and with my lighttpd setup one or two processes > are enough to handle all requests while keeping the site responsive. > As each process takes almost 20MB of RAM, you can imagine that I'd > like to keep the number of processes that run simultaneously to a > minimum. Buffering I/O within the httpd server really helps me with > that. > > I have not been able to find a similar feature built-in into Apache, > and while looking for solutions I came across mod_buffer in Apache > 2.3. Which, if I understood its working right, does not buffer input > *before* the request is passed to the handler, but while the handler > is already "handling" the request. Running an alpha release on a > production server does not seem like a good idea, either. For input, mod_fcgid already does what you want (in fact it doesn't implement any alternative). For output, have you looked at the FcgidOutputBufferSize directive? I looked at mod_buffer and similar logic in mod_fcgid some time ago with the thought that mod_buffer could be used, but IIRC fcgid has flushing unexpectedly integrated with buffering. It would be good for someone to separate that into separately configurable processing and hopefully allow mod_buffer to be used to the extent possible. > I also found mod_security, which is a sophisticated-looking external > module that seems to be able to buffer request data, but doesn't seem > to buffer output. > > This makes me wonder: is my situation that rare, or am I simply > looking in the wrong direction? What is the usual Apache way to handle > situations like this? not rare; somebody sitting next to me at the moment complains of some humongous Drupal (PHP) processes, 8 of which will take over a 48GB system --------------------------------------------------------------------- The official User-To-User support forum of the Apache HTTP Server Project. See <URL:http://httpd.apache.org/userslist.html> for more info. To unsubscribe, e-mail: users-unsubscribe@xxxxxxxxxxxxxxxx " from the digest: users-digest-unsubscribe@xxxxxxxxxxxxxxxx For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx