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

    carlson

    06/22/2021, 11:35 PM
    yes also
    [env.staging.durable_objects]
    based on your wrangler.toml
  • m

    maxbittker

    06/22/2021, 11:37 PM
    thanks that did the trick 🙌
  • r

    rjs

    06/22/2021, 11:39 PM
    Thanks @User!
  • w

    Wallacy

    06/23/2021, 3:10 AM
    FWIW: wrangler tail is wonderful working here again and now I can get the logs from the DO itself (is listed as fake-server , nice )!! Thanks so much for this!!
  • w

    Wallacy

    06/23/2021, 3:40 PM
    Question: If a deploy a DO using WASM the entire bundle should be 1MB right? Theres any support to load wasm modules from KV?
  • b

    brett

    06/23/2021, 4:07 PM
    1. Yes, as far as I know 2. No, we can't allow loading external code at runtime for security reasons
  • g

    Greylock

    06/23/2021, 4:13 PM
    Copy code
    error: Something went wrong! Status: 400 Bad Request, Details {
      "result": null,
      "success": false,
      "errors": [
        {
          "code": 10021,
          "message": "Uncaught SyntaxError: Unexpected token 'export'\n  at line 34326\n"
        }
      ],
      "messages": []
    }
  • g

    Greylock

    06/23/2021, 4:13 PM
    any ideas regarding this error when using the new modular syntax in lieu of supporting durable objects?
  • m

    maxbittker

    06/23/2021, 7:52 PM
    I have a DO with a lot of keys that i'd like to delete... what might be reasons why storage.deleteAll() isn't deleting every key? the docs mention
    In the event of a failure while the deleteAll() operation is still in flight, it may be that only a subset of the data is properly deleted.
    but I'm not sure what might cause that and I don't think I'm getting an error back
  • m

    maxbittker

    06/23/2021, 7:54 PM
    edit: I think it deleted them all. seems like I had to call that function a few times? does it have a cap?
  • b

    brett

    06/23/2021, 9:46 PM
    @User How many keys did it have?
  • m

    maxbittker

    06/23/2021, 10:15 PM
    I have no idea, i was accidentally adding new keys in a loop for a while. so a bunch
  • a

    aiddun

    06/24/2021, 4:23 AM
    2 questions: 1. whats the expected probability that a DO will be evicted? is it based on application memory or global demand? 2. do DO's provide a handler for eviction?
  • b

    brett

    06/24/2021, 1:45 PM
    Hm. It doesn't have a cap, but it can take some time to delete all of your keys if you have a ton. While it's running you should be prevented from doing other storage operations in that object, so if you were able to get/list to check on your keys "during" the delete then it seems like the previous deleteAll must have stopped (presumably with an error?) for some reason... are you workers setup in such a way that you would have caught and sent that error to yourself somewhere?
  • b

    brett

    06/24/2021, 1:48 PM
    1. We don't currently evict DOs that are actively in use, but the machine/process they are in could always crash. We also plan to migrate DOs soon, so you have to be prepared for transient state to vanish (for multiple reasons). 2. No handler currently. Even if we had one you couldn't depend on it because of the crashes noted above. If you're worried about data loss from eviction/crash you should follow the model in Counter example in docs, where we persist data and (re-)load it up into transient state in the constructor.
  • a

    aiddun

    06/24/2021, 2:05 PM
    Thanks!
  • g

    Greylock

    06/24/2021, 2:15 PM
    Weird that the documentation says you can have unlimited storage per object
  • g

    Greylock

    06/24/2021, 2:15 PM
    If you are limited to 128 key values pairs and each value is limited to 32kb
  • g

    Greylock

    06/24/2021, 2:15 PM
    Seems like a hard limit to me?
  • b

    brett

    06/24/2021, 2:26 PM
    Where do you see a limit of 128 KV pairs?
  • g

    Greylock

    06/24/2021, 2:27 PM
    I swear I saw that somewhere
  • g

    Greylock

    06/24/2021, 2:27 PM
    Is that not correct?
  • g

    Greylock

    06/24/2021, 2:28 PM
  • g

    Greylock

    06/24/2021, 2:28 PM
    “Supports up to 128 of pairs at a time”
  • w

    Walshy | Pages

    06/24/2021, 2:29 PM
    That's for get()
  • b

    brett

    06/24/2021, 2:29 PM
    That's the documentation for `get`/`put`
  • g

    Greylock

    06/24/2021, 2:29 PM
    Ah
  • w

    Walshy | Pages

    06/24/2021, 2:29 PM
  • g

    Greylock

    06/24/2021, 2:29 PM
    Google being google
  • g

    Greylock

    06/24/2021, 2:30 PM
    My bad I should have probably followed the link
1...106107108...567Latest