http/2 causes slow file upload and incorrect ajax progress meter

#1
We recently switched a site to all ssl, and since it is a cpanel enabled litespeed, this has enabled http/2 under the current litespeed version 5.0.9. We allow file uploads via a web form with ajax meter to show the progress. This was working fine, but after switching to http/2 we noticed that users were not completing uploads. After investigating, we found that by switching off ssl, and therefore disabling http/2, that the uploads completed much faster. The bigger issue is that with http/2 enabled the ajax progress meter would stop responding before the upload completed. This caused the user to abandon the upload as it appeared that that progress had stopped, even though it was still uploading and upload would eventually complete if they didn't abandon.

Any idea why this might be happening? Is there a way to disable http/2 only for certain pages or actions with litespeed using the cpanel plugin?
 

mistwang

LiteSpeed Staff
#2
You can add

<IfModule Litespeed>
SpdyEnabled off
</IfModule>

to the respective SSL vhost configuration through cPanel vhost level include.
 
#3
Thank you. That has allowed us to test with http/2 disabled and confirm the bug. There is a problem with the litespeed http/2 implementation that is causing file uploads to be significantly slower. We ran three tests, each time enabling and disabling http/2 via the above method.

Results:

25 MB File Upload
http/2 enabled: 21s
http/2 disabled: 6s

44 MB File Upload
http/2 enabled: 51s
http/2 disabled: 10s

94 MB File Upload
http/2 enabled: 144s
http/2 disabled: 14s

We are currently running PHP 5.4.41 with Litespeed 5.0.9. We would like to continue to run http/2. Can this be resolved?
 

mistwang

LiteSpeed Staff
#4
HTTP/2 has bandwidth throttling for virtual streams. It may slow down large data transfers.

Please turn on debug logging for the 25MB file upload. then grep your IP to locate log entries, send the debug log messages to bug@litespeed... for analysis.

It could be improved with some HTTP/2 parameter tuning.
 
Top