I have the weirdest situation going right now... - I got a DO created inside a mini worker wrapper w
I have the weirdest situation going right now...
- I got a DO created inside a mini worker wrapper which is inside a larger Pages project (which sucks for DX, but I digress).
- After noticing that none of the DO features were working locally for some reason, I went on the mini worker and deployed it with
wrangler deploy
to the correct account.
- Even after deploying it, I'm (apparently?) still not able to use the DO... and the requests are 0, despite the bindings being successful (in dev.).
- After this frustration, I decided to deploy to a preview environment, but because we are forced to use the build system version 1 (which doesn't support wrangler.toml
), I knew I had to manually bind the DO on the dashboard.
- Then, to my surprise, the DO's namespace isn't listed among the many other namespaces we have (of other projects). I've triple-checked and it's simply not there, despite it existing on the DO dashboard :shrugg:
Any help is appreciated...16 Replies
I purchased a Paid plan. but How to use Durable Objects, I couldn't find the creation entry?
not created from the dash, created from the wrangler cli attached to a worker, there's more info on the get started guide: https://developers.cloudflare.com/durable-objects/get-started/
ok, Thanks!
What can cause a DO that's present on the dashboard to not appear under the 'Durable Object bindings' menu (under Pages > Settings > Functions)?
I have this issue with exactly one DO... which is ironically the one I need.
Hi everyone
I can't get any error messages. I am trying to get my Durable Object working with Hono.
My route
My controller
My middleware:
The Durable Object is exactly the code from Cloudflare
https://developers.cloudflare.com/durable-objects/examples/websocket-hibernation-server/
In my Cloudflare dashboard, I can see the DO created.
I can connect to the websocket, but no message can be send/receive in the websocket.
webSocketMessage is never ever triggered, but if i close webSocketClose it does get triggered. I am clueless...
The expected result is to receive my message back
Cloudflare Docs
Build a WebSocket server with WebSocket Hibernation · Cloudflare Du...
This example is similar to the Build a WebSocket server example, but uses the WebSocket Hibernation API. The WebSocket Hibernation API should be …
Is there any way to view durable object instances, and browse the storage (for example) from within the dashboard? Or perhaps any third party tools that provide a similar thing?
Great question, we are wondering the same! Our plan is to hook them up to telemetry with some very clear lifecycle tracking for each so we can spot bugs/problems at scale but the more visual debugging & overview tools available in the box, the better.
Hey so I notice, I have a somewhat long promise (bunch of db calls), and I tried to do a promise.all on 10 of them, but they just never return for some reason.... causing timeouts on the db transaction. However when I make the chunksize like 5, everything works
Are durable objects very resource limited or is there something else going on? is there something I can do to fix this?
Perhaps this is the cause: https://developers.cloudflare.com/workers/platform/limits/#simultaneous-open-connections
Perhaps you can think of aggregating them into SQL transactions, in order to reduze the number of outgoing requests?
I still need help with my issue tho :salute_sob: would appreciate any ideas from someone...
yep... seems like it thanks!!!
Appreciate it, yea I am thinking of reorganizing my sql statements to make it so I can reduce the number of outgoing requests
another question, I am using the alarm api to make a "poller". Do I have to use the "waitUntil" api to make sure the durable object doesn't die halfway through the poll, or can I assume that the DO will stay along while executing the alarm function (which can take up to 30seconds to complete)
I'd use the waitUntil just in case. Just be aware that if you use it, you can't 'await' the request (it'll move on and continue with whatever other code it has).
interesting. Thanks!
Unknown User•4mo ago
Message Not Public
Sign In & Join Server To View
hey guys. i have a quick question regarding durable objects. i have an object that is 1:1 with users, meaning each user connects to a different object. im using the hibernatable websockets api as well. is there a way i can communicate with all other objects from within one object? sort of like a broadcast but instead of broadcasting to all connected clients within one object, im trying to broadcast to all other objects that are up