Alex
Explore posts from serversCDCloudflare Developers
β’Created by Alex on 4/14/2025 in #hyperdrive
Screenshot 2025-04-14 at 03.56.10
Since I am using Drizzle, I am not a 100% sure what it exactly is doing ofcourse. And I am not explicitely closing the connection to Hyperdrive either. But I also wouldn't expect a single instance of an isolate to live 4+ hours without any requests. I am at least not doing anything with the connection explicitly. I am even connecting in the
fetch
handler opposed to in the global scope.40 replies
CDCloudflare Developers
β’Created by Alex on 4/14/2025 in #hyperdrive
Screenshot 2025-04-14 at 03.56.10
That broke my app π And this time not just the worker
40 replies
CDCloudflare Developers
β’Created by Alex on 4/14/2025 in #hyperdrive
Screenshot 2025-04-14 at 03.56.10
In addition it also had ~14 actively (within last 60s) connections
40 replies
CDCloudflare Developers
β’Created by Alex on 4/14/2025 in #hyperdrive
Screenshot 2025-04-14 at 03.56.10
Some connection have been idle 4+ hours
40 replies
CDCloudflare Developers
β’Created by Alex on 4/14/2025 in #hyperdrive
Screenshot 2025-04-14 at 03.56.10
So no we are moving the other way π€£ I have a 51 connection limit on my database, which should be way plenty but Hyperdrive is keeping 30+ connections idle for long times: https://screen.bouma.link/V2zQ00XFj5yCB9j0jYnH
40 replies
CDCloudflare Developers
β’Created by Alex on 4/14/2025 in #hyperdrive
Screenshot 2025-04-14 at 03.56.10
Currently seeing ~22 connection to MySQL, which is way more then before (don't think I've seen more then 2 before). So something is definitly better!
40 replies
CDCloudflare Developers
β’Created by Alex on 4/14/2025 in #hyperdrive
Screenshot 2025-04-14 at 03.56.10
Let's see how it holds up over the weekend!
40 replies
CDCloudflare Developers
β’Created by Alex on 4/14/2025 in #hyperdrive
Screenshot 2025-04-14 at 03.56.10
Very much going in the right direction! https://screen.bouma.link/TmpHFwkgHQv2KM6CDTsK
40 replies
CDCloudflare Developers
β’Created by Alex on 4/14/2025 in #hyperdrive
Screenshot 2025-04-14 at 03.56.10
Hope to see stable service after that π€ Thanks for the update!
40 replies
CDCloudflare Developers
β’Created by nisarg on 4/16/2025 in #general-help
pagination is not work in listing of video
API docs explain it: https://developers.cloudflare.com/api/resources/stream/methods/list/
4 replies
CDCloudflare Developers
β’Created by nisarg on 4/16/2025 in #general-help
pagination is not work in listing of video
It will also always show 1000 records or less. So consider if you would even need pagination π
4 replies
CDCloudflare Developers
β’Created by nisarg on 4/16/2025 in #general-help
pagination is not work in listing of video
I don't think that kind of pagination is available for that endpoint. According to the documentation you need to use
start
and/or end
query params to filter the list further. It doesn't have limit
/offset
based pagination.4 replies
CDCloudflare Developers
β’Created by dhakkad on 4/15/2025 in #workers-help
Will I get charged?
Unfortunately I don't think they specify nor want to specify that exactly to prevent people taking advantage of it.
7 replies
CDCloudflare Developers
β’Created by dhakkad on 4/15/2025 in #workers-help
Will I get charged?
Take a look here: https://developers.cloudflare.com/workers/platform/limits/
under cpu time itβs explained that if your worker runs infrequently it is allowed to go a little over. Other rules also apply the the cron workers depending on how much they run.
The free plan will show an error if you go over a limit. It will not charge you.
7 replies
CDCloudflare Developers
β’Created by ArcticDev on 4/15/2025 in #general-help
Cloudflare integration with Workers and Access
As long as you don't need YouTube level resolution selection and just want to serve the video files as they are to the user R2 is perfectly suitable. You would Cloudflare Stream if you want to on-demand transcode the video files basically. But you can do that work yourself and store the results on R2.
4 replies
CDCloudflare Developers
β’Created by ArcticDev on 4/15/2025 in #general-help
Cloudflare integration with Workers and Access
Do I need to cache these files locally on my machine or can they be streamed directly from R2?Depends on what you are doing with them π Video files and images can be served directly from R2. But if you want to work with them because you want to edit them and stuff like that you would need to download them, process them and re-upload. Not sure that answers your question though. It might help to search for your use case in combination with S3. This service from AWS is similar to R2 and much older. Generally most things that S3 is capable of R2 can also do. Not very helpful but also not much info to go of. You second question is using workers and access. You can indeed let a worker perform the OAuth dance, you don't even need workers if there is nothing special and you could use zero trust instead as a managed option, although you pay per user there which might not be what you need. Then onto the point how your application can know and trust which user is authenticated. This works the same for your own worker or zero trust (usually) and it works with JWT token. They can be validated locally to be valid and created by Cloudflare/your worker and the information therein provides information about the authenticated user. So your app could have a middleware that reads that JWT and validates it and sets up the correct user to be authenticated for example. That is how it generally works. Hopefully this helps a little bit in your understanding.
4 replies
CDCloudflare Developers
β’Created by Alex on 4/15/2025 in #general-help
Scapping/Datacenter IP
There is no option to select "Datacenters" for a rule but there are 2 filters to play with:
- "Known Bots", this might capture what you want, you can make an exception for "Verified Bot Category" maybe to prevent Google from scraping for example. Depends on if you want to stop all scraping or just the excessive ones.
- "AS Num", lookup via WHOIS which AS number the IP belongs to and offer a challenge to those, you can for example challenge AS Num 14061 to challenge all IP's from the cloud provider Digital Ocean.
Keep in mind that a lot of traffic comes from datacenter IPs you might want to still want to allow like webhooks from other services or good bots uptime monitoring and the like. So be careful with sweeping rules that block large parts of the internet!
Good luck!
19 replies
CDCloudflare Developers
β’Created by RJ Roberts on 4/14/2025 in #workers-help
Workers Sentry integration hasn't been working for a year.
Damn. Maybe try asking Sentry support. I am assuming there is someone there who would be able to contact Cloudflare for this issue.
6 replies
CDCloudflare Developers
β’Created by mish on 4/13/2025 in #general-help
How to natively support wildcard subdomains (*.example.com) on Cloudflare Pages via Workers?
Awesome! Good luck with your app!
4 replies
CDCloudflare Developers
β’Created by zehawk on 4/15/2025 in #durable-objects
I see that the worker websocket is
I am trying to see where it's exactly coming from. But WebSockets usually have some inactivity timeout. It might come from the client or the server (or both) and is usually solved by sending ping/pong messages at a regular interval.
10 replies