backend workers.
PR: 45445
Trunk version of patch:
http://svn.apache.org/viewvc?rev=684341&view=rev
Backport version for 2.2.x of patch:
Trunk version of patch works, but
http://people.apache.org/~rpluem/patches/37770_2.2.x.diff
fixes a conflict regarding the needed minor bump.
+1: rpluem, jim, jerenkrantz
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.2.x@696316
13f79535-47bb-0310-9956-
ffa450edef68
*) mod_ssl: Rewrite shmcb to avoid memory alignment issues. PR 42101.
[Geoff Thorpe]
+ *) mod_proxy_http: Introduce environment variable proxy-initial-not-pooled to
+ avoid reusing pooled connections if the client connection is an initial
+ connection. PR 37770. [Ruediger Pluem]
+
*) mod_dav_fs: Retrieve minimal system information about directory
entries when walking a DAV fs, resolving a performance degradation on
Windows. PR 45464. [Joe Orton, Jeff Trawick]
connections in the pool the Apache will return <code>SERVER_BUSY</code>
status to the client.
</td></tr>
+ <tr><td>connectiontimeout</td>
+ <td>timeout</td>
+ <td>Connect timeout in seconds.
+ The number of seconds Apache waits for the creation of a connection to
+ the backend to complete.
+ </td></tr>
<tr><td>disablereuse</td>
<td>Off</td>
<td>This parameter should be used when you want to force mod_proxy
* structure
* 20051115.15(2.2.9) Add interpolate_env to proxy_dir_conf and
* introduce proxy_req_conf.
+ * 20051115.16(2.2.9) Add conn_timeout and conn_timeout_set to
+ * proxy_worker struct.
*
*/
#ifndef MODULE_MAGIC_NUMBER_MAJOR
#define MODULE_MAGIC_NUMBER_MAJOR 20051115
#endif
-#define MODULE_MAGIC_NUMBER_MINOR 15 /* 0...n */
+#define MODULE_MAGIC_NUMBER_MINOR 16 /* 0...n */
/**
* Determine if the server's current MODULE_MAGIC_NUMBER is at least a
worker->ping_timeout = apr_time_from_sec(ival);
worker->ping_timeout_set = 1;
}
+ else if (!strcasecmp(key, "connectiontimeout")) {
+ /* Request timeout in seconds.
+ * Defaults to connection timeout
+ */
+ ival = atoi(val);
+ if (ival < 1)
+ return "Connectiontimeout must be at least one second.";
+ worker->conn_timeout = apr_time_from_sec(ival);
+ worker->conn_timeout_set = 1;
+ }
else {
return "unknown Worker parameter";
}
char retry_set;
char disablereuse;
char disablereuse_set;
+ apr_interval_time_t conn_timeout;
+ char conn_timeout_set;
};
/*
"Failed to set");
}
- /* Set a timeout on the socket */
- if (worker->timeout_set == 1) {
+ /* Set a timeout for connecting to the backend on the socket */
+ if (worker->conn_timeout_set) {
+ apr_socket_timeout_set(newsock, worker->conn_timeout);
+ }
+ else if (worker->timeout_set == 1) {
apr_socket_timeout_set(newsock, worker->timeout);
}
else if (conf->timeout_set == 1) {
continue;
}
+ /* Set a timeout on the socket */
+ if (worker->timeout_set == 1) {
+ apr_socket_timeout_set(newsock, worker->timeout);
+ }
+ else if (conf->timeout_set == 1) {
+ apr_socket_timeout_set(newsock, conf->timeout);
+ }
+ else {
+ apr_socket_timeout_set(newsock, s->timeout);
+ }
+
conn->sock = newsock;
connected = 1;
}