Intermittently poor throughput on static asset requests in Cloudflare Pages

I’ve noticed that a website I have deployed via Cloudflare Pages is intermittently very slow to load. When this happens, static files which are only 90-70 kB take 10s of seconds.

Because the issue happens intermittently and infrequently, it’s very difficult to debug, but it seems to be location-specific. I just had a user tell me that the affected page wasn’t loading for them in Midwestern America, but as they were experiencing the issue, I was able to load the page Sydney without any problems.

I don’t believe this is a caching issue. With caching deliberately disabled in my browser, the page will load in a reasonable amount of time when the issue isn’t occurring, but will be glacially slow when it is occurring.

Can you try and get some more info?

What’d be really helpful is:

Thanks for the quick reply! Though the issue isn’t happening right now, I collected the /cdn-cgi/trace and traceroute output in Sydney because I figured there might be some value in comparing them when the issue is and isn’t happening:

fl=491f6
h=cloudflare.com
ip=49.180.23.161
ts=1696880834.404
visit_scheme=https
uag=Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/117.0.0.0 Safari/537.36
colo=SYD
sliver=none
http=http/2
loc=AU
tls=TLSv1.3
sni=plaintext
warp=off
gateway=off
rbi=off
kex=X25519
traceroute to web.duolicious.app (104.21.13.141), 30 hops max, 60 byte packets
 1  _gateway (192.168.0.1)  0.933 ms  1.725 ms  1.925 ms
 2  * * *
 3  10.194.29.17 (10.194.29.17)  40.490 ms  40.787 ms  41.608 ms
 4  * * *
 5  211.29.126.62 (211.29.126.62)  41.411 ms 211.29.126.78 (211.29.126.78)  41.460 ms 211.29.126.82 (211.29.126.82)  41.412 ms
 6  172.24.126.1 (172.24.126.1)  31.000 ms  14.992 ms 172.24.126.3 (172.24.126.3)  20.353 ms
 7  10.194.122.209 (10.194.122.209)  20.516 ms 10.194.122.213 (10.194.122.213)  16.487 ms 10.194.122.209 (10.194.122.209)  16.713 ms
 8  * * *
 9  mas1-hu0-5-0.ig.optusnet.com.au (198.142.249.246)  18.382 ms mas2-hu0-5-0.ig.optusnet.com.au (198.142.249.254)  19.402 ms mas2-hu0-4-0.ig.optusnet.com.au (198.142.249.250)  19.620 ms
10  203.208.147.113 (203.208.147.113)  129.246 ms  138.658 ms  138.682 ms
11  mas1-hu0-5-0.ig.optusnet.com.au (198.142.249.246)  16.820 ms  17.175 ms  14.994 ms
12  172.71.208.2 (172.71.208.2)  134.525 ms  145.869 ms 172.71.212.2 (172.71.212.2)  130.946 ms
13  104.21.13.141 (104.21.13.141)  136.683 ms cloudflare1-lacp-100g.hkix.net (123.255.90.246)  144.342 ms 104.21.13.141 (104.21.13.141)  149.831 ms

I’ll post here again, likely in a few days, when the issue pops up again. I’ll be sure to include a HAR.

I am having the same issue (though a re-deploy fixed it). Essentially, small (60-80Kb) files were taking 30s to load. Unfortunately, the re-deployment happened before I can use your debug instructions. But thought of putting this here as it could be useful.

Other things to mention:

  • This is a preview branch.
  • The website was not used for probably a week or so.

@WalshyMVP Aha! It finally happened again! Here’s the HAR file:

https://gist.github.com/duogenesis/91d29b004681f9262d5316881e6237d0

In the HAR file, there’s an initial request to https://web.duolicious.app where the TTFB is about 38 seconds. Then there’s a couple other requests where the TTFB is acceptable-ish (~600 ms), but then one request times out and the other takes 2 minutes to download a 45 kB file from Cloudflare!

I captured this traceroute output as the issue was happening:

~ % traceroute web.duolicious.app
traceroute to web.duolicious.app (172.67.132.227), 30 hops max, 60 byte packets
 1  _gateway (192.168.0.1)  1.118 ms  1.235 ms  1.407 ms
 2  10.111.13.188 (10.111.13.188)  26.346 ms  36.935 ms  35.290 ms
 3  172.24.126.1 (172.24.126.1)  33.525 ms  33.055 ms  33.636 ms
 4  10.194.122.213 (10.194.122.213)  36.734 ms 10.194.122.209 (10.194.122.209)  36.694 ms  36.653 ms
 5  * * *
 6  mas1-hu0-4-0.ig.optusnet.com.au (198.142.249.242)  35.232 ms  13.757 ms  14.895 ms
 7  203.208.147.113 (203.208.147.113)  184.000 ms  183.607 ms *
 8  * mas1-hu0-5-0.ig.optusnet.com.au (198.142.249.246)  31.677 ms *
 9  203.208.147.113 (203.208.147.113)  164.782 ms  164.957 ms  169.584 ms
10  172.67.132.227 (172.67.132.227)  243.603 ms * *

Interestingly, I attempted to load the website in a few tabs at the same time. When one tab finally succeeded, they all suddenly loaded at a regular speed again. I don’t think my internet connection was the issue because I was able to load other websites as this was all happening.

Today’s slow-down happened a few hours after a I deployed a new version of the website. When the issue arose today, I was downloading the page for the first time after the deployment. It feels like the static content wasn’t cached on the edge server and fetching it took a very long time. I’m on the free plan, so I wonder if my page is just getting prioritised. Still, 2 minutes to load 45 kB seems too excessive to be deliberate.

Cheers!