You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by ro...@apache.org on 2006/03/05 05:33:46 UTC
svn commit: r383278 -
/httpd/httpd/branches/fcgi-proxy-dev/modules/proxy/mod_proxy_fcgi.c
Author: rooneg
Date: Sat Mar 4 20:33:44 2006
New Revision: 383278
URL: http://svn.apache.org/viewcvs?rev=383278&view=rev
Log:
Stop holding open connections to the backend fastcgi processes. At
this point we lack a good way to manage them, and thus it's really
easy to end up with situations where you get weird timeouts because
other worker process are holding all the connections open.
This allows Rails applications to reliably work with mod_proxy_fcgi.
* modules/proxy/mod_proxy_fcgi.c
(dispatch): Add a timeout for our poll. This should be controlled
by a config option of some sort, but for now just hardcode it.
(proxy_fcgi_handler): Set close_on_recycle to 1, so we don't hold
open connections to the fastcgi processes.
Modified:
httpd/httpd/branches/fcgi-proxy-dev/modules/proxy/mod_proxy_fcgi.c
Modified: httpd/httpd/branches/fcgi-proxy-dev/modules/proxy/mod_proxy_fcgi.c
URL: http://svn.apache.org/viewcvs/httpd/httpd/branches/fcgi-proxy-dev/modules/proxy/mod_proxy_fcgi.c?rev=383278&r1=383277&r2=383278&view=diff
==============================================================================
--- httpd/httpd/branches/fcgi-proxy-dev/modules/proxy/mod_proxy_fcgi.c (original)
+++ httpd/httpd/branches/fcgi-proxy-dev/modules/proxy/mod_proxy_fcgi.c Sat Mar 4 20:33:44 2006
@@ -527,7 +527,8 @@
apr_size_t len;
int n;
- rv = apr_poll(&pfd, 1, &n, -1);
+ /* XXX don't hardcode 30 seconds */
+ rv = apr_poll(&pfd, 1, &n, apr_time_from_sec(30));
if (rv != APR_SUCCESS) {
break;
}
@@ -881,7 +882,13 @@
}
backend->is_ssl = 0;
- backend->close_on_recycle = 0;
+
+ /* XXX Setting close_on_recycle to 0 is a great way to end up with
+ * timeouts at this point, since we lack good ways to manage the
+ * back end fastcgi processes. This should be revisited when we
+ * have a better story on that part of things. */
+
+ backend->close_on_recycle = 1;
/* Step One: Determine Who To Connect To */
status = ap_proxy_determine_connection(p, r, conf, worker, backend,