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 2016/01/08 15:33:38 UTC

[Bug 58825] New: Upload really big files with PUT method and XMLHTTPRequest hangs HTTP2 when using Chrome

https://bz.apache.org/bugzilla/show_bug.cgi?id=58825

            Bug ID: 58825
           Summary: Upload really big files with PUT method and
                    XMLHTTPRequest hangs HTTP2 when using Chrome
           Product: Apache httpd-2
           Version: 2.4.18
          Hardware: PC
                OS: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: mod_http2
          Assignee: bugs@httpd.apache.org
          Reporter: stephane@compodata.com

Hello,

I encountered a bug that only happens when using Google Chrome and Apache HTTP2
: when I send big files, lets say at least 500Mo, using XMLHTTPRequest and PUT
method, the upload hangs around 200Mo and 450Mo.

This does not seem to happen when using FireFox and Apache2 HTTP2 (or maybe on
higher sizes),
This does not happen with Google Chrome nor FireFox using NGINX with HTTP2,
and this does not happen with any browser using HTTP/1.1 with Apache

when it hangs, i have to restart Apache to kill connections (and to also
release php-fpm sockets)

We used Apache 2.4.18 w/ nghttp2 1.6.0 versus nginx 1.9.7 on Gentoo Linux
I tried with Google Chrome 47 and Canary 49 vs Firefox 43
I did not tried if it can work with POST method, because in this case PHP load
files into memory since we can't stream directly using php://stdin

-- 
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 58825] Upload really big files with PUT method and XMLHTTPRequest hangs HTTP2 when using Chrome

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=58825

--- Comment #9 from stephane@compodata.com ---
Currently, and at least for big file upload using XMLHTTPRequest, here are the
avg speed results (incl. php overhead) :

Chrome / HTTP2 / Apache : 21MB/s
Chrome / HTTP1 / Apache : 49MB/s
Chrome / HTTP2 / NGinx  : 18MB/s
Chrome / HTTP1 / NGinx  : 40MB/s
FireFox / HTTP2 / Apache : 51MB/s
FireFox / HTTP1 / Apache : 98MB/s
FireFox / HTTP2 / NGinx  : 45MB/s
FireFox / HTTP1 / NGinx  : 86MB/s

So Chrome performs really really bad, but HTTP2 protocol is not good for that
too... and I'm not convinced that doing Apache/HTTP2 speed optimisation would
greatly improve speed for the last...

-- 
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 58825] Upload really big files with PUT method and XMLHTTPRequest hangs HTTP2 when using Chrome

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=58825

--- Comment #11 from Stéphane BARBARAY <st...@compodata.com> ---
Hello Adrian

Please try with

git clone https://github.com/icing/mod_h2/ --branch v1.1.0

since v1.2.0 HEAD does not compile yet

-- 
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 58825] Upload really big files with PUT method and XMLHTTPRequest hangs HTTP2 when using Chrome

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=58825

--- Comment #4 from Stefan Eissing <st...@eissing.org> ---
I see. Well, so much for that explanation...

To read the log correctly: do you have a H2WindowSize configured and at what
value? Thanks,

Stefan

-- 
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 58825] Upload really big files with PUT method and XMLHTTPRequest hangs HTTP2 when using Chrome

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=58825

--- Comment #6 from stephane@compodata.com ---
I managed to compile the latest https://github.com/icing/mod_h2 using apxs, and
despite that content-length is present using chrome, this version seems to
resolve the issue. Will try on another server to confirm that...

-- 
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 58825] Upload really big files with PUT method and XMLHTTPRequest hangs HTTP2 when using Chrome

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=58825

--- Comment #10 from Adrian Sandu <ad...@asandu.eu> ---
I think I'm hitting the same thing with a simple form

<form method="post" action="upload.html" enctype="multipart/form-data">
File: <input type="file" name="file" />
<input type="submit" name="submit" />
</form>

upload.html is empty.

Without the HTTP2 module, everything is ok.
I can send you a debug log too if interested...
I tried compiling https://github.com/icing/mod_h2 with no luck.

  CC       mod_http2_la-h2_push.lo
h2_push.c:682:22: error: conflicting types for built-in function ‘log2’
[-Werror]
 static unsigned char log2(apr_uint32_t n)
                      ^
cc1: all warnings being treated as errors
Makefile:703: recipe for target 'mod_http2_la-h2_push.lo' failed
make[1]: *** [mod_http2_la-h2_push.lo] Error 1

gcc version 4.9.3 (Gentoo 4.9.3 p1.2, pie-0.6.3)
Apache 2.4.18

-- 
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 58825] Upload really big files with PUT method and XMLHTTPRequest hangs HTTP2 when using Chrome

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=58825

--- Comment #5 from stephane@compodata.com ---
no H2WindowSize configured, nor any H2 directives

-- 
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 58825] Upload really big files with PUT method and XMLHTTPRequest hangs HTTP2 when using Chrome

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=58825

Stefan Eissing <st...@eissing.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEEDINFO                    |RESOLVED
         Resolution|---                         |FIXED

--- Comment #14 from Stefan Eissing <st...@eissing.org> ---
Seems fixed with upcoming changes available via github.

-- 
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 58825] Upload really big files with PUT method and XMLHTTPRequest hangs HTTP2 when using Chrome

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=58825

Adrian Sandu <ad...@asandu.eu> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |adrian.sandu@asandu.eu

-- 
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 58825] Upload really big files with PUT method and XMLHTTPRequest hangs HTTP2 when using Chrome

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=58825

--- Comment #1 from Stefan Eissing <st...@eissing.org> ---
Can you mail me a error_log of such an upload with 

  LogLevel http2:debug

to icing (at) apache.org? That would give me a good start in finding where the
problem is. Thanks!

-- 
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 58825] Upload really big files with PUT method and XMLHTTPRequest hangs HTTP2 when using Chrome

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=58825

Stefan Eissing <st...@eissing.org> changed:

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

-- 
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 58825] Upload really big files with PUT method and XMLHTTPRequest hangs HTTP2 when using Chrome

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=58825

--- Comment #15 from Stéphane BARBARAY <st...@compodata.com> ---
Yes, it's fixed since 1.1.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 58825] Upload really big files with PUT method and XMLHTTPRequest hangs HTTP2 when using Chrome

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=58825

--- Comment #12 from Stefan Eissing <st...@eissing.org> ---
There is a release 1.2.2 out that should compile without errors.

-- 
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 58825] Upload really big files with PUT method and XMLHTTPRequest hangs HTTP2 when using Chrome

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=58825

--- Comment #13 from Stéphane BARBARAY <st...@compodata.com> ---
I can confirm that v1.2.2 compiles fine

-- 
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 58825] Upload really big files with PUT method and XMLHTTPRequest hangs HTTP2 when using Chrome

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=58825

--- Comment #7 from stephane@compodata.com ---
I confirm that installing version 1.1.0 from https://github.com/icing/mod_h2
did the trick, now big files upload work on chrome, it's still 3 times slower
than FireFox, but at least it 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 58825] Upload really big files with PUT method and XMLHTTPRequest hangs HTTP2 when using Chrome

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=58825

--- Comment #8 from Stefan Eissing <st...@eissing.org> ---
So, the bugfix with window_size calculations did not only affect chunked
encodings but also sth in regard to the small frame sizes of the Chrome
uploads. Good to know.

Regarding the speed differences, that seems worth investigating and reporting
to the Chrome team. I admit that upload speed tests have not been my top
priority and there is probably something to improve in Apache, but the Firefox
comparison shows that Chrome also has a task here, it seems.

Thanks for the logs and the testing!

-Stefan

-- 
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 58825] Upload really big files with PUT method and XMLHTTPRequest hangs HTTP2 when using Chrome

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=58825

--- Comment #2 from Stefan Eissing <st...@eissing.org> ---
Thanks for the logs. What I see is the following:

Firefox
- sends 516255587 bytes in the PUT body, closes and gets a 200 response
- the worker consumes 516255587 bytes (= all bytes)

Chrome
- sends 105153266 bytes in the PUT body, stops sending and, after a timeout, 
- the worker consumes 105118981 bytes, which is 34285 bytes less than sent
- Apache waits for data several seconds
- chrome closes the stream RST_STREAM, error=8 ("cancel").

Now, this can be explained by a bug in mod_http2 2.4.18 which calculates
WINDOW_UPDATE wrong, *if* the client uploads using HTTP/1.1 chunked encoding.
Does the Firefox PUT have a content-length? Does the Chrome lack one? 

Then this makes the difference. I have fixed this in the development trunk and
you can also build a fixed version from https://github.com/icing/mod_h2, if you
have the 2.4.18 apxs installed.

-- 
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 58825] Upload really big files with PUT method and XMLHTTPRequest hangs HTTP2 when using Chrome

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=58825

--- Comment #3 from stephane@compodata.com ---
I sent you another log, the one from chrome://net-internals, and there is a
content-length. BTW, the chunk are indeed smalls compared to firefox ones
(approx 2k vs 64k)

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