ASF Bugzilla – Attachment 35431 Details for
Bug 61616
mod_proxy_connect: stall and connection loss on bi-directional traffic
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
shortening the poll timeout for send_brigade_blocking
apache-try-short-tmo.diff (text/plain), 3.11 KB, created by
Carsten Wolff
on 2017-10-17 08:46:03 UTC
(
hide
)
Description:
shortening the poll timeout for send_brigade_blocking
Filename:
MIME Type:
Creator:
Carsten Wolff
Created:
2017-10-17 08:46:03 UTC
Size:
3.11 KB
patch
obsolete
>diff -ur apache2-2.4.27/modules/proxy/mod_proxy_connect.c apache2-2.4.27.new/modules/proxy/mod_proxy_connect.c >--- apache2-2.4.27/modules/proxy/mod_proxy_connect.c 2017-10-17 10:04:29.244310247 +0200 >+++ apache2-2.4.27.new/modules/proxy/mod_proxy_connect.c 2017-10-17 09:00:32.304658856 +0200 >@@ -422,6 +422,13 @@ > ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, APLOGNO(01025) > "backend was readable"); > #endif >+ /* now we know, we can read, but we can't be sure that >+ * there's enogh room in the outgoing socket to write all >+ * we read. Reduce timeout on outgoing socket to not risk >+ * blocking for three minutes in poll(), called by >+ * send_brigade_blocking(), when the socket send buffer >+ * fills up */ >+ apr_socket_timeout_set(client.pfd.desc.s, 10); > done |= ap_proxy_transfer_between_connections(r, > backend.c, > client.c, >@@ -431,6 +438,8 @@ > NULL, > CONN_BLKSZ, > 1); >+ /* reset timeout */ >+ apr_socket_timeout_set(client.pfd.desc.s, client.timeout); > if (!done && client.c->data_in_output_filters) { > apr_pollset_remove(pollset, &client.pfd); > client.pfd.reqevents = APR_POLLOUT; >@@ -465,6 +474,13 @@ > ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, APLOGNO(01027) > "client was readable"); > #endif >+ /* now we know, we can read, but we can't be sure that >+ * there's enogh room in the outgoing socket to write all >+ * we read. Reduce timeout on outgoing socket to not risk >+ * blocking for three minutes in poll(), called by >+ * send_brigade_blocking(), when the socket send buffer >+ * fills up */ >+ apr_socket_timeout_set(backend.pfd.desc.s, 10); > done |= ap_proxy_transfer_between_connections(r, > client.c, > backend.c, >@@ -474,6 +490,8 @@ > NULL, > CONN_BLKSZ, > 1); >+ /* reset timeout */ >+ apr_socket_timeout_set(backend.pfd.desc.s, backend.timeout); > if (!done && backend.c->data_in_output_filters) { > apr_pollset_remove(pollset, &backend.pfd); > backend.pfd.reqevents = APR_POLLOUT;
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 61616
:
35421
|
35422
|
35423
|
35424
|
35425
|
35426
|
35427
|
35429
|
35430
|
35431
|
35432
|
35442
|
35443
|
35446
|
35447
|
35512
|
35513
|
35620
|
35621
|
35623
|
35639
|
35737
|
35738
|
35739
|
35772
|
35774
|
35776
|
35783
|
35784
|
35786
|
35787
|
35789