From ab0c93f8f92bf62c622feef2db93d7645207367d Mon Sep 17 00:00:00 2001
From: Jeff Trawick
Date: Thu, 15 Apr 2010 16:38:33 +0000
Subject: [PATCH] describe the connection reuse issue, which can break the
simplest FastCGI applications
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@934479 13f79535-47bb-0310-9956-ffa450edef68
---
docs/manual/mod/mod_proxy_fcgi.xml | 23 +++++++++++++++++++----
1 file changed, 19 insertions(+), 4 deletions(-)
diff --git a/docs/manual/mod/mod_proxy_fcgi.xml b/docs/manual/mod/mod_proxy_fcgi.xml
index 61853c13db..6ddcfd7751 100644
--- a/docs/manual/mod/mod_proxy_fcgi.xml
+++ b/docs/manual/mod/mod_proxy_fcgi.xml
@@ -40,7 +40,7 @@
mod_proxy_fcgi have to be present in the server.
Unlike mod_fcgid
- or mod_fastcgi,
+ and mod_fastcgi,
mod_proxy_fcgi has no provision for starting the
application process; fcgistarter is provided for
that purpose.
@@ -60,17 +60,32 @@
Remember, in order to make the following examples work, you have to
enable mod_proxy and mod_proxy_fcgi.
- Simple script
+ Single application instance
ProxyPass /myapp/ fcgi://localhost:4000/
+ This application should be able to handle multiple concurrent
+ connections. mod_proxy enables connection reuse by
+ default, so after a request has been completed the connection will be
+ held open by that httpd child process and won't be reused until that
+ httpd process routes another request to the application. If the
+ FastCGI application is unable to handle enough concurrent connections
+ from httpd, requests can block waiting for the application to close
+ an existing connection. One way to resolve this is to disable connection
+ reuse on the ProxyPass directive, as shown in
+ the following example:
+
+ Single application instance, no connection reuse
+ ProxyPass /myapp/ fcgi://localhost:4000/ disablereuse=on
+
+
The balanced gateway needs mod_proxy_balancer and
at least one load balancer algorithm module, such as
mod_lbmethod_byrequests, in addition to the proxy
modules listed above. mod_lbmethod_byrequests is the
- default.
+ default, and will be used for this example configuration.
- Balanced gateway
+ Balanced gateway to multiple application instances
ProxyPass /myapp/ balancer://myappcluster/
<Proxy balancer://myappcluster/>
--
2.50.1