workers-sdk icon indicating copy to clipboard operation
workers-sdk copied to clipboard

Intermittent 504 errors deploying static files to cloudflare pages

Open nhoss2 opened this issue 5 months ago • 7 comments
trafficstars

What versions & operating system are you using?

wrangler 4.18.0, node 22, debian 12

Please provide a link to a minimal reproduction

No response

Describe the Bug

I have a static site which gets updated every ~10 minutes from a github actions workflow running a nextjs build outputting static html. I then use wrangler pages deploy (https://developers.cloudflare.com/workers/wrangler/commands/#deploy-1) which uploads the static files and deploys it to cloudflare pages. note: I'm not using cloudflare pages to do any builds, just uploading the static files there.

This has been fine for a months without issue but for the last couple of days about 30% of my uploads to cloudflare pages are getting 504 errors, sometimes up to 4 or 5 times in a row.

Every single time its this same issue where the static file uploads finish and then there is a 504 gateway timeout error

Please provide any relevant error logs

⛅️ wrangler 4.18.0 (update available 4.19.1)
─────────────────────────────────────────────
Uploading... (70/261)
Uploading... (133/261)
Uploading... (197/261)
Uploading... (261/261)
✨ Success! Uploaded 191 files (70 already uploaded) (2.40 sec)


✘ [ERROR] Received a malformed response from the API

  <html>
  <head><title>504 Gateway Time-out</title></head>
  <body>
  <center><h1>504 Gateway Time-out</... (length = 168)

  POST /accounts/***/pages/projects/***/deployments -> 504 Gateway Time-out
  
  If you think this is a bug, please open an issue at: https://github.com/cloudflare/workers-sdk/issues/new/choose

nhoss2 avatar Jun 03 '25 21:06 nhoss2

I'm experiencing the same issue. I initially thought it was due to my Wrangler version, so I tried upgrading to the latest 3.X.X, but that didn't work. I then upgraded to 4.X.X, which also resulted in the same problem.

robtimmer avatar Jun 06 '25 11:06 robtimmer

+1

We're also experiencing 504 issues while random deploy static site to Cloudflare

harmant avatar Jun 09 '25 08:06 harmant

+1

We're experiencing the same issue periodically across multiple different similar workflows (build with actions then upload using wrangler).

gunnaraas avatar Jun 11 '25 20:06 gunnaraas

We're encountering this problem as well.

cherrymcgerry avatar Jun 12 '25 17:06 cherrymcgerry

This issue seems fixed for me for the last ~48 hours

nhoss2 avatar Jun 17 '25 04:06 nhoss2

+1 We're experiencing the same issue.

petarbasic avatar Jun 18 '25 12:06 petarbasic

This appears related to projects with a large number of deployments. The query is timing out before we can get results (though, unrelated to an issue with workers-sdk itself). Escalating this internally.

WillTaylorDev avatar Jun 19 '25 03:06 WillTaylorDev

this is being tracked in internal ticket WC-3692. there are no changes required within workers-sdk, but will keep this open until the internal ticket is resolved for tracking purposes.

cc @matthewdavidrodgers @WillTaylorDev

lrapoport-cf avatar Jul 07 '25 13:07 lrapoport-cf

the internal ticket has now been closed so closing this issue

lrapoport-cf avatar Aug 18 '25 13:08 lrapoport-cf