https://discord.cloudflare.com logo
Join Discord
Powered by
# durable-objects
  • j

    Jacob Wright

    03/22/2023, 12:59 PM
    I'm seeing
    Network connection lost.
    errors. Retries will usually get around it. Is there anything I can do to prevent/improve these? I mean, other than the retries workaround. I'm using
    locationHint
    when accessing the DOs for the first time (data import running for users). Could that be an issue?
  • j

    Jacob Wright

    03/22/2023, 1:47 PM
    Here is something like that added to a similar library: https://github.com/dabblewriter/durable-apis/commit/dad78ba42f5d940e0d0ac1008f1306b255fa83ae
  • s

    sathoro

    03/22/2023, 1:49 PM
    oh wow, that is exactly what I was looking for
  • s

    sathoro

    03/22/2023, 1:49 PM
    well almost exactly, just a different lib
  • s

    sathoro

    03/22/2023, 1:49 PM
    lol
  • j

    Jacob Wright

    03/22/2023, 1:58 PM
    I was running into these errors yesterday, saw your comment, and added it to my version of itty-durable. ๐Ÿ˜„ So far it is working well.
  • j

    Jacob Wright

    03/22/2023, 1:59 PM
    But as the errors are intermittent, may still be too early to tell.
  • s

    sathoro

    03/22/2023, 2:00 PM
    funny enough my product is also writing related. just totally different
  • j

    Jacob Wright

    03/22/2023, 2:00 PM
    I was just getting "Network connection lost." and had client-side retries. Mostly 1 retry did it, but 1 time it tried 10 times (without exp backoff) before failing.
  • j

    Jacob Wright

    03/22/2023, 2:00 PM
    Oooh, what?
  • s

    sathoro

    03/22/2023, 2:01 PM
    we just had a crazy launch this week
  • j

    Jacob Wright

    03/22/2023, 2:02 PM
    Congratulations! Mine is https://www.dabblewriter.com. And we are so excited to play with AI for Dabble. But currently in the middle of a server migration over to Cloudflare. ๐Ÿ™‚
  • s

    sathoro

    03/22/2023, 2:02 PM
    yeah it looks really nice! CF workers has been really nice for us overall
  • j

    Jacob Wright

    03/22/2023, 2:03 PM
    Yeah, I'm excited for what the platform offers, just nervous because we have 5k active users that get grumpy when service is disrupted in any way. ๐Ÿ˜…
  • s

    sathoro

    03/22/2023, 2:04 PM
    haha yeah that is tricky
  • s

    sathoro

    03/22/2023, 2:05 PM
    seems like you are on top of things though
  • s

    sathoro

    03/22/2023, 2:13 PM
    @Jacob Wright wait is that your real last name, I just realized ๐Ÿคฃ
  • j

    Jacob Wright

    03/22/2023, 9:06 PM
    Yes. ๐Ÿ˜„ works out
  • j

    Jacob Wright

    03/22/2023, 9:07 PM
    petitioned my wife to allow me to change our last name to Awesome, but she wouldn't let me. Just thought what a great gift that would be to my posterity if I gave them the last name of Awesome, ya know? She didn't catch the vision. sorry #812577823599755274 ๐Ÿ˜ฌ
  • j

    Jacob Wright

    03/23/2023, 12:38 AM
    One of my concerns with using Durable Object storage has been the opaqueness of the data. So I fixed that by building a data console we can use. Took a few days, but I'm happy with how it turned out. Linking this here in case it helps inspire someone to create a similar solution for their data. See: https://discord.com/channels/595317990191398933/783765338692386886/1088258710134075554
  • l

    Larry

    03/23/2023, 2:46 PM
    Here's a little addendum to the brilliant "choose three" post. No video, but Medium will read it to you if you want. https://medium.com/cloudflare-durable-objects-design-patterns/maintaining-consistent-state-56f5bb22dba9
  • j

    johtso

    03/23/2023, 2:49 PM
    I actually read your post already! Thanks so much for putting these bits of writing out there
  • a

    AndriusJon

    03/23/2023, 3:21 PM
    Hi, I am experiencing this very strange behavior with Cloudflare workers and Durable Object. This is the code, as basic as it can be: let id = env.DO.idFromName(myId) let stub = env.DO.get(id) let resp = await stub.fetch(request) let response = await resp.text() console.log(response) When running worker locally, the first request seems to work fine and I can see the log is printed from the Durable Object Class. However, when I refresh the page the same console.log(response) prints one of the two (log in the DO Class is not printed, so the DO itself is not reached): 1. Bad Request (400) Bad Request (400) 2. error code: 1021 Do you have any idea what could be wrong here? Everything was working perfectly a few weeks ago, not sure what has changed. Thank you for any help! ๐Ÿ™
  • f

    frankichiro

    03/23/2023, 11:08 PM
    Hello. My Worker has no errors locally, but once published I get this:
    Durable Object namespace binding cannot communicate with other nodes.
    I have no clue what it means. My worker just calls a DO, there's nothing complicated about it. What could be the problem?
  • f

    frankichiro

    03/23/2023, 11:09 PM
    The worker's wrangler-file has this:
    Copy code
    [durable_objects]
    bindings = [
      { name = "SESSION", class_name = "Session", script_name = "sessions" }
    ]
  • f

    frankichiro

    03/24/2023, 1:29 PM
    Oh, I found the problem. I had dropped down to a free plan instead of a paid plan, so Durable Objects had simply stopped working... :3
  • s

    Skye

    03/24/2023, 1:36 PM
    I'd make an issue on the wrangler repo for that message being so unclear, could definitely be improved
  • f

    frankichiro

    03/24/2023, 1:49 PM
    That's true. I have also learned that an already published DO can still be updated while on the free plan (even though it will result in the error above), while you'll get an error message if you try to create a new one. I'll make an issue about this.
  • f

    frankichiro

    03/24/2023, 2:24 PM
    Done. https://github.com/cloudflare/workers-sdk/issues/2944
  • a

    avi

    03/25/2023, 10:50 PM
    how can I export durable object data?
1...524525526...567Latest