Muhymin
CDCloudflare Developers
•Created by Muhymin on 11/7/2024 in #pages-help
PNPM v9
Is there any way to use pnpm v9 in Cloudflare Pages other than manually installing it using
npm install
?9 replies
CDCloudflare Developers
•Created by Muhymin on 11/9/2023 in #pages-help
Tailing Pages Functions
Hi 👋 ! I am trying to tail deployments using both the dashboard and
wrangler pages deployment tail
commands but they aren't working. Starting any of them makes the entire website inaccessible. If someone visits the deployment, they see the Error 1101 Worker threw exception
page. And the 1101
error page doesn't go away even after disabling the tails. Cloudflare doesn't output any useful error also, the error is simply Error: internal error
.
I need to tail the deployments to debug an issue but this bug isn't letting me use the tailing functionality.15 replies
CDCloudflare Developers
•Created by Muhymin on 10/8/2023 in #workers-help
Cron job: Exceeded CPU Limit
2 replies
CDCloudflare Developers
•Created by Muhymin on 10/7/2023 in #workers-help
Workers receiving random requests
All our workers have been receiving random invalid requests for a few days now, possibly by bots. What should be done to mitigate it? Below is a log of a few minutes by
wrangler tail
:3 replies
CDCloudflare Developers
•Created by Muhymin on 9/30/2023 in #workers-help
Randomly worker requests are being canceled
Hi 👋 ! We have a Cloudflare worker (with two environments) that accepts PATCH requests and makes update requests to Baserow. I suddenly noticed yesterday the worker is canceling the requests without throwing any kind of errors. Everything works fine tills a fetch request is made. Sometimes the code works, so I'm confused if the worker is hitting any time limit.
Note:
1. Changing the custom domain URL and changing it back somewhat fixes the issue. Sometimes the requests get canceled but the fetch request goes through. Sometimes the fetch request goes through without canceling the request.
2. Setting
workers_dev
to true
somewhat fixes the issue too. Sometimes the requests get canceled but the fetch request goes through. If I set it to false
again, sometimes it keeps working, sometimes it doesn't.
Code: https://github.com/dilmaheu/dilmahtea.me-workers/blob/main/src/workers/dilmahtea-me-baserow/src/index.ts18 replies
CDCloudflare Developers
•Created by Muhymin on 7/28/2023 in #workers-help
Region detection in pages website
What's the best way to detect the region of a user? I am currently intercepting the requests of our Pages website using Cloudflare workers, and adding a cookie to add country/region data from the geolocation data available inside Cloudflare workers.
Is it a good idea to get the region data in this way?? I am already facing two issues:
1. Modifying the response adds around 100-200ms of delay to the page load. And Cloudflare also generates a new Etag for every request since the response is being modified, so it also invalidates the browser cache.
2. And also I couldn't make the worker intercept the requests for the preview websites created from non-production branches. What do I have to use as the route pattern??
2 replies
CDCloudflare Developers
•Created by Muhymin on 5/9/2023 in #pages-help
Cloudflare is rebuilding node_modules in every build
Cloudflare isn't caching the
node_modules
folder so that consequents build run faster. I see the message Started restoring cached node modules
and Finished restoring cached node modules
messages on the top of all the deployment logs. But it's not working actually.
npm
used to reinstall and download all the dependencies every time. Now, I am using pnpm
, and the pnpm store is set to node_modules/.pnpm-store
but it's redownloading and installing all the dependencies every time.
I am also using astro-imagetools
which stores its cache inside node_modules/.cache/astro-imagetools
which is also not working. And it's heavily impacting the build time.
I have tested both retrying deployments, adding a new commit, and triggering the deploy hooks. But none of them is able to restore the node_modules
.14 replies
CDCloudflare Developers
•Created by Muhymin on 5/7/2023 in #pages-help
fetch() calls throwing Connect Timeout Errors
We are fetching a lof images from our CMS during build. We are recently getting
Connect Timeout Error
a lot. First, it was one image. But now the more images are getting added to the CMS, the more we are getting Connect Timeout Error
. Why is it happening? Is there any concurrent request limit in Cloudflare Pages? And if there's a limit, should Cloudflare automatically handle this?17 replies
CDCloudflare Developers
•Created by Muhymin on 2/11/2023 in #workers-help
How to intercept pages.dev requests using Cloudflare Workers?
HI 👋 ! Is it possible to intercept requests to
*.project-name.pages.dev
routes using Cloudflare Workers??7 replies
CDCloudflare Developers
•Created by Muhymin on 2/7/2023 in #workers-help
Is it possible to make specific worker services accessible only through service bindings?
Hi 👋 ! Is it possible to make specific worker services accessible only through service bindings?
7 replies