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

    sathoro

    04/25/2023, 11:08 AM
    hmm it didn't get caught by the retry logic though
  • s

    sathoro

    04/25/2023, 11:08 AM
    I tried to specifically catch that error since it's the most frequent
  • b

    bret_pat

    04/25/2023, 1:39 PM
    If we have a bundled worker sleeps, does it count as a part of it's 50ms limit? I'm creating throttle third party API requests and I'm wondering how I can delay processing more queue messages until after the 3rd party API has stopped rate limiting us
  • h

    HardAtWork

    04/25/2023, 1:43 PM
    It will not, as sleep doesn’t count as CPU time
  • x

    xbyte

    04/25/2023, 1:44 PM
    Hey guys I hope some of you might be able to have an answer for my question. I'm building a project, that will have millions of static pages. I read that you can only do up to 20.000 pages with direct upload, but what if all were in a git repo? Or can this limit be increased on a paid plan?
  • k

    kian

    04/25/2023, 1:45 PM
    It's a hard limit currently
  • x

    xbyte

    04/25/2023, 1:46 PM
    So if i should have 100.000 pages, i would have to do 5 pages in theory?
  • j

    James

    04/25/2023, 1:47 PM
    What are you building? Can you describe your use-case a little more? Millions of static pages sounds like a lot
  • j

    James

    04/25/2023, 1:47 PM
    Are they similar enough that you could have a few and then
    HTMLRewriter
    them perhaps with Functions?
  • x

    xbyte

    04/25/2023, 1:48 PM
    Can you explain Functions ? Pages will be similar, there will be a language variation, but only a few data elements on each page will be different. Building a index for millions of domains for marketing research
  • j

    James

    04/25/2023, 1:51 PM
    I’d start here: https://developers.cloudflare.com/pages/platform/functions/ But yes translation is a perfect use-case for HTMLRewriter. Retrieve raw page asset, and then run rewrite over it to add language keys at various elements
  • x

    xbyte

    04/25/2023, 1:52 PM
    But I would still have 1.1M+ domains that will have their own page, Can a page pull data server-side?
  • j

    James

    04/25/2023, 1:53 PM
    You have over a million domains? Yes, Functions run server-side.
  • j

    James

    04/25/2023, 1:54 PM
    For a use-case like a million domains, you’re going to have to reach out about some kind of enterprise agreement.
  • x

    xbyte

    04/25/2023, 1:54 PM
    Not my own million domains 😄 The database will consist of over a million domains, where we will tell different marketing factors for each.
  • d

    Dani Foldi

    04/25/2023, 1:55 PM
    unless you're thinking about pregenerating all these, I'd create a single template page, and do the "work" when a page is requested, possibly with a Function
  • x

    xbyte

    04/25/2023, 1:55 PM
    ourdomain.com/de/market-analysis/united-states/apple.com
  • h

    HardAtWork

    04/25/2023, 1:56 PM
    If you have a database for it, you could probably end up with just ~20 assets plus a Function to localize/insert data for each domain
  • j

    James

    04/25/2023, 1:56 PM
    Ahh okay, so then yeah. Let’s say you had a stats page, you’d pull that using functions, query your DB or whatever for info, and then make changes server-side to the HTML using HTMLRewriter before serving. So rather than 1M stats pages, you’d have 1.
  • x

    xbyte

    04/25/2023, 1:56 PM
    looks like function is the way to go, and then do rewrites, or what is it named in CloudflarE?
  • j

    James

    04/25/2023, 1:57 PM
    Functions themselves can handle routing. https://developers.cloudflare.com/pages/platform/functions/routing/
  • x

    xbyte

    04/25/2023, 1:57 PM
    Excellent, that's the way to go for sure 🙂
  • x

    xbyte

    04/25/2023, 1:57 PM
    Thank you 🙂
  • j

    James

    04/25/2023, 1:58 PM
    Awesome!
  • b

    bret_pat

    04/25/2023, 2:08 PM
    Moved to queue topic!
  • s

    sathoro

    04/25/2023, 2:10 PM
    Error: Worker exceeded CPU time limit.
    D:
  • s

    sathoro

    04/25/2023, 2:22 PM
    this is with an Unbound worker
  • k

    kian

    04/25/2023, 2:23 PM
    Unbound Workers have 30 seconds of CPU time
  • s

    sathoro

    04/25/2023, 2:23 PM
    hmm I am really not sure how we could be exceeding 30 seconds CPU time
  • s

    sathoro

    04/25/2023, 2:24 PM
    famous last words?
1...241424152416...2509Latest