Hi guys, We are seeing a noticeable increase in am...
# ask-questions
n
Hi guys, We are seeing a noticeable increase in amount of timeouts. The curious thing is that is seems to be dependent on the originating network. Normally we had our code running as a Cloudflare Worker. It was using GB JavaScript SDK, creating a GrowthBook object and doing init, if init is not done in 2 secs that's a timeout in our app. Approximately around August 21 we had a spike in timeouts that somewhat cooled down but we still have about a 1000 timeouts per hour (for about 10000 requests). We tried something different, we fired up a simple node server on AWS that receives parameters in an HTTP request and performs a GrowthBook request (from scratch: creating a new object on every request, doing init and destroying it). And our Cloudflare Worker is simply proxying to this AWS interface. Surprisingly, when we introduce this new step, we get much better results: about 60 timeouts per hour (still 10000 requests). We tried switching between "Cloudflare Worker -> GrowthBook" to "Cloudflare Worker -> AWS -> GrowthBook" and the results are consistent. So is there anything we can do to solve this issue? A thousand timeouts out of ten thousands is unacceptable for us, and even 60 is a bit too much and certainly more than we had before mid-August.
🙌 1
We use something like this:
Copy code
const gb = new GrowthBook({
      apiHost: "<https://cdn.growthbook.io>",
      clientKey: clientKey,
      attributes: gbAttributes,
      subscribeToChanges: false,
      // enableDevMode: true,
      // Disable background streaming connection
      backgroundSync: false,
    });

    await withTimeout(
      gb.init({ skipCache: true }),
      GROWTHBOOK_TIMEOUT_MS,
      'GrowthBook init timeout'
    );
(In production we do our own caching in front of this worker, so here we disable the cache)
r
Hi @narrow-shampoo-40181 we are facing the same issue. Our set up is a little different but would be interesting to know how you did it. We don't get timeouts at all in our Cloudflare Worker because we set up the KV store that updates with a webhook. So we bypass the Growthbook request completely. However we still have issues when Growthbook is initialised on the client side - also seeing a lot of timeouts even with a value set to max 10 seconds... I was thinking of creating a small api endpoint to get the payload from the KV store, and use that instead of relying on the Growthbook api call which is what seems to time out
105 Views