New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
🐛 BUG: pages publish very slow / crashing #1194
Comments
Hey there! Sorry to hear this. What you're describing with the dashboard is expected (we'll be bumping that up soon). What you're seeing with wrangler however is a bug. Our hypothesis is that your auth token is expiring during the upload because of low upload bandwidth? I've opened a PR with a fix for this. Can you try this version of wrangler and let us know if it helps?
Cheers. |
@sidharthachatterjee I have tested this a couple times, I am having no issues when running the |
I ran |
Interesting. Thank you for testing this. In that case, my hypothesis was incorrect. I'll ship that anyway since it's an improvement. I'll add some verbose debug logs and ship a version for you'll so we can get some more info on what's up. Cheers. |
Thank you for actively working on this. |
Hi folks! Can you please try This will print some debugging information for us (HTTP requests, how long they took, the response code) |
@sidharthachatterjee fresh logs: ▲ [WARNING] HTTP 200 /accounts/:account_id/pages/projects/:project/upload-token 0.50s
▲ [WARNING] HTTP 200 /pages/assets/check-missing 1.36s
▲ [WARNING] HTTP 200 /pages/assets/upload 139.55s
▲ [WARNING] HTTP 200 /pages/assets/upload 153.21s
▲ [WARNING] HTTP 200 /pages/assets/upload 172.97s
▲ [WARNING] HTTP 200 /pages/assets/upload 145.21s
▲ [WARNING] HTTP 200 /pages/assets/upload 138.10s
▲ [WARNING] HTTP 200 /pages/assets/upload 128.20s
▲ [WARNING] HTTP 403 /pages/assets/upload 129.70s
▲ [WARNING] HTTP 403 /pages/assets/upload 153.34s
▲ [WARNING] HTTP 403 /pages/assets/upload 144.38s
▲ [WARNING] HTTP 403 /pages/assets/upload 128.99s
▲ [WARNING] HTTP 403 /pages/assets/upload 127.93s
▲ [WARNING] HTTP 403 /pages/assets/upload 144.57s
▲ [WARNING] HTTP 403 /pages/assets/upload 134.71s
▲ [WARNING] HTTP 403 /pages/assets/upload 154.54s
▲ [WARNING] HTTP 403 /pages/assets/upload 142.15s
▲ [WARNING] HTTP 403 /pages/assets/upload 148.50s
▲ [WARNING] HTTP 403 /pages/assets/upload 152.17s
▲ [WARNING] HTTP 403 /pages/assets/upload 136.69s
▲ [WARNING] HTTP 403 /pages/assets/upload 138.48s
🌍 Uploading... (255/7962)
/Users/ek/.npm/_npx/8be3397ebf390916/node_modules/wrangler/wrangler-dist/cli.js:16264
throw ex;
^
FatalError: Failed to upload files. Please try again.
at /Users/ek/.npm/_npx/8be3397ebf390916/node_modules/wrangler/wrangler-dist/cli.js:123709:31
at runMicrotasks (<anonymous>)
at processTicksAndRejections (node:internal/process/task_queues:96:5)
at async run2 (/Users/elijahkotyluk/.npm/_npx/8be3397ebf390916/node_modules/wrangler/wrangler-dist/cli.js:122141:26) {
code: 1
} |
Okay, interesting. So that would imply that the JWT expiry fix didn't work. Can you try this now?
Added a few more logs. |
Using Result:
It really seems to be much much slower than the K/V upload btw |
I'm able to upload everything now eventually but I think it's only because I upgraded my internet connection. It still seems to take a bit longer than it ought to My site is 339MB But I get: |
|
@sidharthachatterjee I took some time to debug and find a solve for the expiring JWT on a fork, this seems to only be an issue for my larger projects I am deploying through direct uploads. Even with the JWT issue resolved, the uploads are still taking quite a bit longer than I would hope. |
Hi @ElijahKotyluk , glad to hear you got it working on a fork. If you can, please put up a PR with your changes, but we have added some refresh logic a little while ago, so maybe this won't be necessary anymore with the latest wrangler versions? We'll close this issue out in the meantime, but please reopen if there's an ongoing issue. Thanks! |
Hi @GregBrimble, thank you for the response. I just tested the latest and still hit issues with the refetch and speed. I will get something up today, need to spend some time figuring out the test I broke. The issue with the current implementation is that the way the error is being checked in the case the JWT expires won't pass, the error caught is a |
Ah, okay, thanks for that additional info! Absolutely feel free to put up whatever you have right now and we can help get it over the line 😊 |
@GregBrimble, PR is up. Thanks again. |
Hi, i'm having the exact same problem. Any chance for a fix in the near future? |
I'm having the same issue with a 90MB project, with around 5840 files |
same here |
Still seeing this happen on a regular basis, starting to become a bit of a slowdown for development. |
Can not upload a ~300 file project. Maybe the CLI should gzip a project then unzip it on the server? |
This puts the entire project on hold. Tried Several times.
|
Same
What's weird is that on a particular Wi-fi network, it works flawlessly. |
`🌏 Uploading... (166/2249) C:\Users\bhadoo\AppData\Roaming\npm\node_modules\wrangler\wrangler-dist\cli.js:30632 FatalError: Failed to upload files. Please try again. Error: {"text":"Received a malformed response from the API","notes":[{"text":"Expired JWT"},{"text":"POST /pages/assets/upload -> 403 Forbidden"}],"kind":"error","name":"ParseError"}) Wrangler 3.5.1 Can't refresh JWT Token. (happened after 10 minutes maybe?) |
I guess, you added this
but this doesn't fix the problem
Which can be fixed by some method where the error code can be extracted and checked and returned with
For me this temporary Fixed Code Worked.
also MAX_UPLOAD_ATTEMPTS is set to 5 is very low. I hope this helps. |
I'm also experiencing this problem:
|
Hey folks! We've been incrementally making reliability improvements to our service and to Wrangler, and we're hopefully in a place where any issues with |
I'm running into this same issue with
Wrangler version is 3.22.4. I've retried several times, and it always fails after ~15 minutes of trying to upload the files. |
What version of
Wrangler
are you using?2.0.8
What operating system are you using?
Mac
Describe the Bug
I'm trying to upload my site, it's about 300MB, it uploads to KV fine with wrangler 1
When I upload to pages with wrangler 2 it goes reaaallly slow and then crashes
I posted it on discord https://discord.com/channels/595317990191398933/799437470004412476/983442112534175815
If I try to upload it via web it errors telling me not to upload more than 1000 files. If I zip it it says the zip is too big. I don't see a way to upload a zip file with the CLI.
No idea how to get my files into Pages.
The text was updated successfully, but these errors were encountered: