https://discord.cloudflare.com logo
Join Discord
Powered by
# workers-discussions
  • i

    Isaac McFadyen | YYZ01

    05/28/2023, 3:36 PM
    Think you mean wall time? 😅
  • w

    Walshy | Pages

    05/28/2023, 3:36 PM
    no?
  • i

    Isaac McFadyen | YYZ01

    05/28/2023, 3:37 PM
    As far as I understood it, it was allowed 30s of wall time? (but realistically unlimited - 30s is the minimum they'll give you for runtime restarts)
  • w

    Walshy | Pages

    05/28/2023, 3:37 PM
    nah 30 seconds of CPU time
  • i

    Isaac McFadyen | YYZ01

    05/28/2023, 3:37 PM
    Oh, interesting. 🤔
  • w

    Walshy | Pages

    05/28/2023, 3:37 PM
    the 30 second buffer is in case of runtime restarts
  • w

    Walshy | Pages

    05/28/2023, 3:37 PM
    but it could run for an hour if it wanted
  • i

    Isaac McFadyen | YYZ01

    05/28/2023, 3:37 PM
    Yeah I think I'm getting those numbers confused 😄
  • w

    Walshy | Pages

    05/28/2023, 3:38 PM
    (we do a bad job at explaining all this )
  • e

    Erisa | Support Engineer

    05/28/2023, 3:38 PM
    its implied on here with the cpu runtime 30s and then duration unlimited with an asterisk leading to the restarts disclaimer

    https://cdn.discordapp.com/attachments/779390076219686943/1112404585236140123/image.png▾

  • w

    Walshy | Pages

    05/28/2023, 3:39 PM
    A 502 from a Worker isn't something I'd expect. If you ran out of CPU time you'd get a proper error. 502 comes from us trying to hit your origin
  • w

    Walshy | Pages

    05/28/2023, 3:40 PM
    Are you trying to hit your origin / an external service? If so, I think the problem is from there
  • s

    semicolondev

    05/28/2023, 3:40 PM
    GPT4 is taking longer > 1.3s but worker itself is getting timed out in 1.2s Should I switch to Lambda? I need to switch ASAP, I'm sorta losing 💵
  • w

    Walshy | Pages

    05/28/2023, 3:40 PM
    1 second is nothing
  • s

    semicolondev

    05/28/2023, 3:41 PM
    OpenAI but I tried it from playground and it's working fine 🤔
  • e

    Erisa | Support Engineer

    05/28/2023, 3:41 PM
    even our default http timeout is 100 seconds
  • w

    Walshy | Pages

    05/28/2023, 3:41 PM
    OpenAI's internal APIs and external APIs are different
  • e

    Erisa | Support Engineer

    05/28/2023, 3:41 PM
    but if its actively streaming data that won't be hit either
  • w

    Walshy | Pages

    05/28/2023, 3:41 PM
    Do you have a curl we can run to see the behaviour?
  • e

    Erisa | Support Engineer

    05/28/2023, 3:42 PM
    and also yeah my first thought for 502 from a worker is that its being thrown from an upstream origin
  • s

    semicolondev

    05/28/2023, 3:42 PM
    I'm not streaming, it's just normal HTTP request
  • s

    semicolondev

    05/28/2023, 3:49 PM
    If it's thrown from upstream, I should get the error in try catch right?
  • s

    semicolondev

    05/28/2023, 3:49 PM
    Can I DM you?
  • w

    Walshy | Pages

    05/28/2023, 3:50 PM
    yep
  • w

    Walshy | Pages

    05/28/2023, 3:50 PM
    No, it won't be in catch
  • w

    Walshy | Pages

    05/28/2023, 3:50 PM
    otherwise you'd see an exception
  • w

    Walshy | Pages

    05/28/2023, 3:50 PM
    you can check the status code though
  • s

    semicolondev

    05/28/2023, 3:51 PM
    I'm running it via Postman

    https://cdn.discordapp.com/attachments/779390076219686943/1112407902930608138/image.png▾

  • e

    Erisa | Support Engineer

    05/28/2023, 3:53 PM
    Whats the response body?
  • s

    semicolondev

    05/28/2023, 3:54 PM
    Strange, if I run it on local I'm getting 504 but I deployed it to staging (to share curl) it's working now 🤦‍♂️
1...25052506250725082509Latest