Fixing broken http/2 downloads from Nextcloud on an Apache server

I recently installed Apache 2.4.27 and Nextcloud 12.0.2 on Arch Linux using the available offical packages.
After enabling http2 I found that larger downloads from Nextcloud were failing after a couple of hundred megabytes. The download just stops until there is a timeout and the browser shows a failure. The server logs showed no error at all but infact a nice http 200 success code.

After switching between php-fpm and an fcgi wrapper, between mpm worker and mpm event I gave it a test and disabled http2 again and voila the downloads were working just fine.

And indeed there are some issues to be found when searching the net and especially https://github.com/owncloud/core/issues/26753 sounded very familiar.

After fiddling with some of the mod_http2 options I finally increased the H2StreamMaxMemSize Directive to an arbitrary but significantly higher value: H2StreamMaxMemSize 5120000

No more failures after that, even when downloading multiple files concurrently from different devices! No more stuck files and perfect happyness 😉

Leave a Comment


NOTE - You can use these HTML tags and attributes:
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>