Mailing List Archive

[Bug 66019] Files can randomly take 5 seconds to be served when KeepAlive is On
https://bz.apache.org/bugzilla/show_bug.cgi?id=66019

Ruediger Pluem <rpluem@apache.org> changed:

What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |NEEDINFO

--- Comment #1 from Ruediger Pluem <rpluem@apache.org> ---
Does the problem also appear with 2.4.53? Which MPM is used?

--
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 66019] Files can randomly take 5 seconds to be served when KeepAlive is On [ In reply to ]
https://bz.apache.org/bugzilla/show_bug.cgi?id=66019

--- Comment #2 from tbaccelli@gmail.com ---
Yes, the problem also appear with 2.4.43, I'm using mpm_prefork

--
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 66019] Files can randomly take 5 seconds to be served when KeepAlive is On [ In reply to ]
https://bz.apache.org/bugzilla/show_bug.cgi?id=66019

--- Comment #3 from Ruediger Pluem <rpluem@apache.org> ---
2.4.43 or 2.4.53?

--
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 66019] Files can randomly take 5 seconds to be served when KeepAlive is On [ In reply to ]
https://bz.apache.org/bugzilla/show_bug.cgi?id=66019

--- Comment #4 from Ruediger Pluem <rpluem@apache.org> ---
What is your KeepaliveTimeout and your Timeout setting?

--
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 66019] Files can randomly take 5 seconds to be served when KeepAlive is On [ In reply to ]
https://bz.apache.org/bugzilla/show_bug.cgi?id=66019

--- Comment #5 from tbaccelli@gmail.com ---
I meant 2.4.53, sorry ???????.

I use the default configuration for KeepaliveTimeout which seems to be 5
seconds. If I change it to 2 seconds for instance, I can see that it has an
impact and files randomly take 2 seconds to be served.

Timeout is set to 60.

--
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 66019] Files can randomly take 5 seconds to be served when KeepAlive is On [ In reply to ]
https://bz.apache.org/bugzilla/show_bug.cgi?id=66019

--- Comment #6 from Yann Ylavic <ylavic.dev@gmail.com> ---
Please reproduce on 2.4.53 with "LogLevel trace8" and attach the error_log
here.

--
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 66019] Files can randomly take 5 seconds to be served when KeepAlive is On [ In reply to ]
https://bz.apache.org/bugzilla/show_bug.cgi?id=66019

--- Comment #7 from Yann Ylavic <ylavic.dev@gmail.com> ---
Also with LogLevel trace8, loading mod_dumpio like the below:
LoadModule dumpio_module modules/mod_dumpio.so
DumpIOInput on
DumpIOOutput on
would be useful.

--
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 66019] Files can randomly take 5 seconds to be served when KeepAlive is On [ In reply to ]
https://bz.apache.org/bugzilla/show_bug.cgi?id=66019

--- Comment #8 from tbaccelli@gmail.com ---
The file is too big to be attached here, I uploaded on my dropbox:
https://www.dropbox.com/s/xrt4l1vi6hyhizs/error_log?dl=0

--
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 66019] Files can randomly take 5 seconds to be served when KeepAlive is On [ In reply to ]
https://bz.apache.org/bugzilla/show_bug.cgi?id=66019

--- Comment #9 from tbaccelli@gmail.com ---
To add a little more context, during the request logged, 3 files took 5 seconds
to be served: jquery.min.js?v=5.1.3, bootstrap.bundle.min.js?v=5.1.3 and
jquery-ui-timepicker-addon.js?v=5.1.3

--
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 66019] Files can randomly take 5 seconds to be served when KeepAlive is On [ In reply to ]
https://bz.apache.org/bugzilla/show_bug.cgi?id=66019

--- Comment #10 from Yann Ylavic <ylavic.dev@gmail.com> ---
On the httpd side it seems that those files are sent/flushed in a timely manner
(within the same second), and then 5 seconds later the connection is closed
because no new request arrives before the keepalive timeout.

Somehow the client/browser thinks the response is incomplete until the
connection is closed, while it looks complete from the HTTP protocol point of
vue (as shown in the traces).

Could you please capture a network trace on localhost (since both httpd and the
client seem to be there) with something like (as root probably):
# tcpdump -s0 -w /tmp/66019.cap tcp port 80
and attach "66019.cap" here?

(note that you can [g]zip the attachments before attaching them to reduce their
size)

--
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 66019] Files can randomly take 5 seconds to be served when KeepAlive is On [ In reply to ]
https://bz.apache.org/bugzilla/show_bug.cgi?id=66019

--- Comment #11 from tbaccelli@gmail.com ---
Created attachment 38255
--> https://bz.apache.org/bugzilla/attachment.cgi?id=38255&action=edit
Result of tcpdump

For this request, 3 files took 5 seconds to be served:
theme.css?v=5.1.3&nocache=996186ltr&server=1,
jquery-ui-timepicker-addon.js?v=5.1.3 and functions.js?v=5.1.3

--
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 66019] Files can randomly take 5 seconds to be served when KeepAlive is On [ In reply to ]
https://bz.apache.org/bugzilla/show_bug.cgi?id=66019

--- Comment #12 from Yann Ylavic <ylavic.dev@gmail.com> ---
Created attachment 38256
--> https://bz.apache.org/bugzilla/attachment.cgi?id=38256&action=edit
Handle TCP_CORK vs TCP_NOPUSH peculiarities

From the network traces, it seems that TCP packets are not PSH-ed appropriately
on OSX, the last packet could be retained in the TCP stack until the connection
is closed.

We may need to handle TCP_CORK on Linux and TCP_NOPUSH on BSDs/OSX differently
in the core output filter, could you please try this patch on your system?

--
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 66019] Files can randomly take 5 seconds to be served when KeepAlive is On [ In reply to ]
https://bz.apache.org/bugzilla/show_bug.cgi?id=66019

--- Comment #13 from tbaccelli@gmail.com ---
Created attachment 38257
--> https://bz.apache.org/bugzilla/attachment.cgi?id=38257&action=edit
Result of tcpdump after patch

Just tried with the patch, I still have the problem.

I attached the result of tcpdump with the patch, 3 files took 5 seconds:
theme.css?v=5.1.3&nocache=1438139389ltr&server=1,
bootstrap.bundle.min.js?v=5.1.3 and jquery-ui-timepicker-addon.js?v=5.1.3

--
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 66019] Files can randomly take 5 seconds to be served when KeepAlive is On [ In reply to ]
https://bz.apache.org/bugzilla/show_bug.cgi?id=66019

Yann Ylavic <ylavic.dev@gmail.com> changed:

What |Removed |Added
----------------------------------------------------------------------------
Attachment #38256|0 |1
is obsolete| |

--- Comment #14 from Yann Ylavic <ylavic.dev@gmail.com> ---
Created attachment 38258
--> https://bz.apache.org/bugzilla/attachment.cgi?id=38258&action=edit
Disable TCP_NOPUSH on OSX

I read that OSX does not release corked data when unsetting TCP_NOPUSH (until
the connection is shutdown?), which is not compatible with how httpd's core
output filter works.
So this patches disables the TCP_NOPUSH optimization on OSX, would you please
test it?

--
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 66019] Files can randomly take 5 seconds to be served when KeepAlive is On [ In reply to ]
https://bz.apache.org/bugzilla/show_bug.cgi?id=66019

--- Comment #15 from tbaccelli@gmail.com ---
I confirm your latest patch works!

--
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 66019] Files can randomly take 5 seconds to be served when KeepAlive is On [ In reply to ]
https://bz.apache.org/bugzilla/show_bug.cgi?id=66019

Yann Ylavic <ylavic.dev@gmail.com> changed:

What |Removed |Added
----------------------------------------------------------------------------
Keywords| |FixedInTrunk
Status|NEEDINFO |NEW

--- Comment #16 from Yann Ylavic <ylavic.dev@gmail.com> ---
Thanks for testing and the great directions.

Checking in r1900100 (trunk).

--
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 66019] Files can randomly take 5 seconds to be served when KeepAlive is On [ In reply to ]
https://bz.apache.org/bugzilla/show_bug.cgi?id=66019

--- Comment #17 from tbaccelli@gmail.com ---
Thanks for your time and reactivity!

--
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