After I upgrade nginx to 1.9.12 and enabled http2 for my website. I
wired issue related with download pictures.
My website is a photo-sharing websites. So on each page there are about
100-200 pictures, the size of each of them may from 10K to 500K.
In the past (http and https with spdy), I’m using below settings:
And everything is good. For users from different countries, they can
the pictures without any error.
But after I upgrade to http2, with the same settings, it seems for users
have a good bandwidth, everything is fine. But for users who are from
different countries, some of them experience issue that on the webpage
pictures can’t display properly. And if they refresh the webpage for 1
or more, then the whole webpage can display as normal, all pictures are
downloaded and display.
I tried to change send_timeout value from 30s to 300s, then it seems it
fix the problem. I used firefox to monitor the webpage load speed, I can
for the pictures of the webpage, the waiting time is pretty long,
it’s more than 60s - 120s, and then firefox start to receiving the
My understanding is that after enable http2, nginx are using
and concurrency” to send out pictures, which mean for the webpage with
pictures, the web browser is ready to receive all pictures when the
connections is established. But for clients who has limited network
bandwidth to the server, they can only download the pictures slowly. And
then some of the pictures will be timeout and can’t display.
So, is there any better solution to fix this kind of issue?
Posted at Nginx Forum: