You are viewing a plain text version of this content. The canonical link for it is here.
Posted to bugs@httpd.apache.org by bu...@apache.org on 2014/07/16 14:14:31 UTC
[Bug 56729] New: Can't use HTTP 1.1 Keep-Alive with mod_reqtimeout
if POST request with POST-DATA respond during more than ->RequestReadTimeout
body=[timeout]
https://issues.apache.org/bugzilla/show_bug.cgi?id=56729
Bug ID: 56729
Summary: Can't use HTTP 1.1 Keep-Alive with mod_reqtimeout if
POST request with POST-DATA respond during more than
->RequestReadTimeout body=[timeout]
Product: Apache httpd-2
Version: 2.4.9
Hardware: PC
OS: Linux
Status: NEW
Severity: normal
Priority: P2
Component: mod_reqtimeout
Assignee: bugs@httpd.apache.org
Reporter: bug_reqtimeout@phmd.net
Keep-Alive broken by mod_reqtimeout since 2.2.20 :
HTTP 1.1 GET : works fine
HTTP 1.1 POST without POST-DATA : works fine
HTTP 1.1 POST with POST-DATA : is broken
As the variable is named, **Request**ReadTimeout ... they must not timeout slow
**Response** body.
exemple :
Slow generated csv text file data during more than 15 sec with
default(ubuntu/debian) RequestReadTimeout body=15
or slow download during more than body=[duration]
or big file download with HTTP POST with post-data during more than timeout
The doc says well that the timeout apply to : receiving **request** headers and
body **from client**
http://httpd.apache.org/docs/2.2/mod/mod_reqtimeout.html
During download of the response (header and body(post-data) from the request is
already received by apache) , the "timer" of mod reqtimeout continue to
increase and at the end of the response the tcp connection is closed ( TCP FIN
).
While keep-alive is in use it close the connexion while another http request is
already in transit.
The network connection is expected to survive for later reuse during 30 more
seconds ( or 100 hit ) because of Client and Server allow Keep-Alive
and apache respond : Connexion: Keep-Alive
Client Header sent :
Connection: keep-alive
Server response header from the first request :
Keep-Alive: timeout=30, max=100
Connection: Keep-Alive
But connexion is closee by tcp FIN at then end of the first request.
Slow "download" (from the client point of view) is not slow **Request** sending
header or slow sending body like Slowloris ..
Big file download at high speed during more than 15 seconds should not break
keep-alive mecanism.
Test case whith mod_proxy and slow jsp page in backend : One POST without
reconnect worke fine ( keep-alive used ( max=X decrease ))
doussot@PC-TEC-12:~$ export URL="http://hostname/page.jsp" ; curl -i -X POST -H
"Connection: keep-alive" -w @curl-format_post.txt "$URL" -o /tmp/output1 "$URL"
-o /tmp/output2 ; head -n 10 /tmp/output1 ; head -n 10 /tmp/output2
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 195k 0 195k 0 0 9957 0 --:--:-- 0:00:20 --:--:-- 9693
0,123: time_namelookup
0,164: time_connect
0,164: time_pretransfer
0,218: time_starttransfer
----------
20,087: time_total
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 195k 0 195k 0 0 10045 0 --:--:-- 0:00:19 --:--:-- 9693
0,000: time_namelookup
0,000: time_connect
0,000: time_pretransfer
0,056: time_starttransfer
----------
19,911: time_total
HTTP/1.1 200 OK
Date: Fri, 11 Jul 2014 12:45:57 GMT
Server: Sun GlassFish Enterprise Server v2.1
X-Powered-By: JSP/2.1
Content-Type: text/html;charset=ISO-8859-1
Set-Cookie: JSESSIONID=............................................; Path=/
Keep-Alive: timeout=30, max=100
Connection: Keep-Alive
Transfer-Encoding: chunked
HTTP/1.1 200 OK
Date: Fri, 11 Jul 2014 12:46:17 GMT
Server: Sun GlassFish Enterprise Server v2.1
X-Powered-By: JSP/2.1
Content-Type: text/html;charset=ISO-8859-1
Set-Cookie: JSESSIONID=............................................; Path=/
Keep-Alive: timeout=30, max=99
Connection: Keep-Alive
Transfer-Encoding: chunked
The second request dont made connect : time_connect 0,000 .. fine
If we add POST data : curl --data "test=1"
doussot@PC-TEC-12:~$ export URL="http://hostname/page.jsp" ; curl -i --data
"test=1" -X POST -H "Connection: keep-alive" -w @curl-format_post.txt "$URL" -o
/tmp/output1 "$URL" -o /tmp/output2 ; head -n 10 /tmp/output1 ; head -n 10
/tmp/output2
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 195k 0 195k 0 6 9949 0 --:--:-- 0:00:20 --:--:-- 9688
0,130: time_namelookup
0,170: time_connect
0,170: time_pretransfer
0,226: time_starttransfer
----------
20,102: time_total
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 195k 0 195k 0 6 10009 0 --:--:-- 0:00:19 --:--:-- 9682
0,000: time_namelookup
0,044: time_connect
0,044: time_pretransfer
0,100: time_starttransfer
----------
19,982: time_total
HTTP/1.1 200 OK
Date: Fri, 11 Jul 2014 12:47:04 GMT
Server: Sun GlassFish Enterprise Server v2.1
X-Powered-By: JSP/2.1
Content-Type: text/html;charset=ISO-8859-1
Set-Cookie: JSESSIONID=............................................ Path=/
Keep-Alive: timeout=30, max=100
Connection: Keep-Alive
Transfer-Encoding: chunked
HTTP/1.1 200 OK
Date: Fri, 11 Jul 2014 12:47:24 GMT
Server: Sun GlassFish Enterprise Server v2.1
X-Powered-By: JSP/2.1
Content-Type: text/html;charset=ISO-8859-1
Set-Cookie: JSESSIONID=............................................; Path=/
Keep-Alive: timeout=30, max=100
Connection: Keep-Alive
Transfer-Encoding: chunked
2x time_connect != 0
A new connection is made beaucause of the drop of the first by apache2.2
Keep-Alive max reset to 100 for the second request
Tested on :
Debian Squeeze
apache2.2-bin -> 2.2.16-6+squeeze12 : OK
Ubuntu precise 12.04LTS
apache2.2-bin -> 2.2.22-1ubuntu1.5 : Broken
Manual build : 2.2.19 : OK
Manual build : 2.2.20 : Broken
Manual build : latest stable : 2.4.9 : Broken
With LogLevel debug: we can see that the network connexion is reset :( 2.4.9 )
[Wed Jul 16 12:24:39.433978 2014] [core:error] [pid 23190:tid 140066114492160]
(104)Connection reset by peer: [client 127.0.0.1:60110] AH00574:
ap_content_length_filter: apr_bucket_read() failed
Related to :
https://issues.apache.org/bugzilla/show_bug.cgi?id=51103
http://svn.apache.org/viewvc?view=revision&revision=1162862
http://svn.apache.org/viewvc?view=revision&revision=1103213
Reproducible with différent client http: curl 7.22/jmeter 2.11
Reproducible différent content to download : generated by /bin/bash cgi / jsp /
big static file
test case available for jsp cgi jmeter curl to follow
--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org
[Bug 56729] Can't use HTTP 1.1 Keep-Alive with mod_reqtimeout if
POST request with POST-DATA respond during more than ->RequestReadTimeout
body=[timeout]
Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=56729
--- Comment #9 from Philippe Doussot <bu...@phmd.net> ---
Thanks Eric for your quick patch.
Since your patch in trunk on 2014-08-30
the next build in branch 2.2 was out :
http://www.apache.org/dist/httpd/CHANGES_2.2.29
without this bug corrected.
Is the backport of this bug delayed or refused in 2.2 branch ?
Must-I absolutely upgrade to 2.4 to get this work well or just wait next 2.2
release ?
--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org
[Bug 56729] Can't use HTTP 1.1 Keep-Alive with mod_reqtimeout if
POST request with POST-DATA respond during more than ->RequestReadTimeout
body=[timeout]
Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=56729
--- Comment #8 from Eric Covener <co...@gmail.com> ---
Thanks again for the report, fixed in trunk http://svn.apache.org/r1621453 and
will propose for backport.
--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org
[Bug 56729] Can't use HTTP 1.1 Keep-Alive with mod_reqtimeout if
POST request with POST-DATA respond during more than ->RequestReadTimeout
body=[timeout]
Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=56729
Philippe Doussot <bu...@phmd.net> changed:
What |Removed |Added
----------------------------------------------------------------------------
Severity|normal |regression
--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org
[Bug 56729] Can't use HTTP 1.1 Keep-Alive with mod_reqtimeout if
POST request with POST-DATA respond during more than ->RequestReadTimeout
body=[timeout]
Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=56729
--- Comment #6 from Eric Covener <co...@gmail.com> ---
Was able to reproduce, investigating
--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org
[Bug 56729] Can't use HTTP 1.1 Keep-Alive with mod_reqtimeout if
POST request with POST-DATA respond during more than ->RequestReadTimeout
body=[timeout]
Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=56729
Philippe Doussot <bu...@phmd.net> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |bug_reqtimeout@phmd.net
--- Comment #1 from Philippe Doussot <bu...@phmd.net> ---
Created attachment 31817
--> https://issues.apache.org/bugzilla/attachment.cgi?id=31817&action=edit
testcase_jmeter_cgi.tgz
testcase jmeter + cgi ( bin/bash ) + result jmeter + network capture wireshark
--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org
[Bug 56729] Can't use HTTP 1.1 Keep-Alive with mod_reqtimeout if
POST request with POST-DATA respond during more than ->RequestReadTimeout
body=[timeout]
Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=56729
--- Comment #2 from Philippe Doussot <bu...@phmd.net> ---
Created attachment 31818
--> https://issues.apache.org/bugzilla/attachment.cgi?id=31818&action=edit
testcase_curl_jsp.tgz
Test case curl + jsp to generate slow content
--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org
[Bug 56729] Can't use HTTP 1.1 Keep-Alive with mod_reqtimeout if
POST request with POST-DATA respond during more than ->RequestReadTimeout
body=[timeout]
Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=56729
--- Comment #4 from Philippe Doussot <bu...@phmd.net> ---
(In reply to Philippe Doussot from comment #3)
> Bug still present in 2.4.10
Default MPM :
Server Version: Apache/2.4.10 (Unix)
Server MPM: event
--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org
[Bug 56729] Can't use HTTP 1.1 Keep-Alive with mod_reqtimeout if
POST request with POST-DATA respond during more than ->RequestReadTimeout
body=[timeout]
Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=56729
--- Comment #5 from Philippe Doussot <bu...@phmd.net> ---
Maybe related to :
https://issues.apache.org/bugzilla/show_bug.cgi?id=44782
I will check more today and post feedback.
--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org
[Bug 56729] Can't use HTTP 1.1 Keep-Alive with mod_reqtimeout if
POST request with POST-DATA respond during more than ->RequestReadTimeout
body=[timeout]
Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=56729
--- Comment #10 from Eric Covener <co...@gmail.com> ---
proposed for 22x, patch applies with minor conflict
http://people.apache.org/~covener/patches/httpd-2.2.2-reqtimeout-slow-post.diff
--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org
[Bug 56729] Can't use HTTP 1.1 Keep-Alive with mod_reqtimeout if
POST request with POST-DATA respond during more than ->RequestReadTimeout
body=[timeout]
Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=56729
Philippe Doussot <bu...@phmd.net> changed:
What |Removed |Added
----------------------------------------------------------------------------
Version|2.4.9 |2.4.10
--- Comment #3 from Philippe Doussot <bu...@phmd.net> ---
Bug still present in 2.4.10
--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org
[Bug 56729] Can't use HTTP 1.1 Keep-Alive with mod_reqtimeout if
POST request with POST-DATA respond during more than ->RequestReadTimeout
body=[timeout]
Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=56729
--- Comment #7 from Eric Covener <co...@gmail.com> ---
The failure is during an AP_MODE_SPECULATIVE read during check_pipeline()
--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org