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

    sathoro

    05/04/2023, 5:00 PM
    oh maybe if it is executing within a DO I can't do anything about that
  • s

    sathoro

    05/04/2023, 5:01 PM
    oof
  • s

    sathoro

    05/04/2023, 5:01 PM
    so if I have long running tasks in a DO is there any way to safely deploy the worker?
  • u

    Unsmart | Tech debt

    05/04/2023, 5:02 PM
    Not that I know of it has to kill the old DOs to update and it does that as soon as possible 🤷
  • s

    sathoro

    05/04/2023, 5:02 PM
    oh man 😦
  • s

    sathoro

    05/04/2023, 5:03 PM
    turns out doing long running background tasks on CF is near impossible 😦
  • u

    Unsmart | Tech debt

    05/04/2023, 5:03 PM
    You should probably be using containers for long running tasks instead of serverless
  • s

    sathoro

    05/04/2023, 5:04 PM
    I think I will work on breaking up the tasks long before I deal with containers again
  • d

    dave

    05/04/2023, 5:23 PM
    does it reset the DO storage too?
  • u

    Unsmart | Tech debt

    05/04/2023, 5:23 PM
    No DO storage will be retained
  • s

    sathoro

    05/04/2023, 6:39 PM
    No, DO storage will be retained 😉
  • l

    Larry

    05/04/2023, 6:39 PM
    I think you meant, "No. DO storage is retained on reset". Without the period, it means the opposite of how I think it behaves
  • s

    sathoro

    05/04/2023, 6:39 PM
    🤣
  • l

    Larry

    05/04/2023, 6:40 PM
    smart minds and fools and all that
  • j

    john.spurlock

    05/04/2023, 10:30 PM
    yep it is
  • s

    sathoro

    05/04/2023, 10:33 PM
    yeah I'm struggling making this reliable...
  • s

    sathoro

    05/04/2023, 10:34 PM
    our DOs seem to just randomly stop. no errors or anything. and it isn't when deploying code, completely random
  • j

    john.spurlock

    05/04/2023, 10:34 PM
    perhaps isolate exceeded memory limits
  • s

    sathoro

    05/04/2023, 10:35 PM
    hmm I don't think so
  • s

    sathoro

    05/04/2023, 10:35 PM
    we have a queue and it automatically retries them after 15 minutes of inactivity and it works the second time
  • u

    Unsmart | Tech debt

    05/04/2023, 10:35 PM
    Pretty sure DOs have the same rule as normal workers where they can be evicted after 30s 🤷
  • s

    sathoro

    05/04/2023, 10:36 PM
    ughh so are long running bg tasks just not really supported on CF right now? I've tried 3 different implementations
  • u

    Unsmart | Tech debt

    05/04/2023, 10:36 PM
    Its not really going to be supported on any serverless platform
  • j

    john.spurlock

    05/04/2023, 10:36 PM
    i've found setting conservative alarms can solve the puzzle, but it's not always the most straightforward way of doing things
  • s

    sathoro

    05/04/2023, 10:37 PM
    hmm wdym? we are running the tasks in an alarm
  • j

    john.spurlock

    05/04/2023, 10:37 PM
    i mean chop up the task into smaller bits and use alarms to keep the DO alive indefinately
  • j

    john.spurlock

    05/04/2023, 10:38 PM
    i have do instances that are alive 24/7 for the whole month, except when they are forced to move datacenters
  • s

    sathoro

    05/04/2023, 10:39 PM
    hrmm this makes me think the problem I am having is not from the DOs getting evicted
  • s

    sathoro

    05/04/2023, 10:39 PM
    because it is happening pretty consistenly
  • s

    sathoro

    05/04/2023, 10:40 PM
    but yeah splitting the task up is probably the direction we will be going
1...547548549...567Latest