https://www.growthbook.io/ logo
#ask-questions
Title
# ask-questions
n

narrow-spoon-80536

12/12/2023, 10:03 AM
Hi Team, We have integrated Growthbook using the React SDK and realized that live updates are not necessary for our specific use case. Therefore, we have configured the GrowthBook instance as shown below:
Copy code
const gb = new GrowthBook({
  apiHost: GROWTH_BOOK_API_HOST,
  clientKey: GROWTH_BOOK_CLIENT_KEY,
  // Enable easier debugging during development
  enableDevMode: true,
  // Disable background streaming connection
  backgroundSync: false,
  subscribeToChanges: false,
  trackingCallback: (experiment, result) => {
    // analytics tracking
  }
});
However, despite these settings, we still observe that the streaming API requests are being made every 5 minutes. Additionally, the GrowthBook dashboard indicates that streaming updates are enabled in the SDK connection. Please advise on how to disable the streaming updates.
f

future-teacher-7046

12/12/2023, 12:35 PM
Does this still happen after you clear localStorage cache? Wondering if it's caching the previous default backgroundSync setting and not updating properly
n

narrow-spoon-80536

12/12/2023, 12:53 PM
yes, it's still the same even after clearing the localStorage cache. Tried in private window as well, but no luck.
f

future-teacher-7046

12/12/2023, 12:57 PM
Ok. I'll take a look and see if I'm able to reproduce. Setting
backgroundSync
to false should in theory stop those streaming requests from happening.
👍 1
n

narrow-spoon-80536

12/12/2023, 1:04 PM
Is there any way we can see the usage of the API in our account?
f

future-teacher-7046

12/12/2023, 1:10 PM
I am able to look that up for you if you share your clientKey (can be in a DM if you don't want to share publicly). I can also disable streaming for your account on our end in the meantime
n

narrow-spoon-80536

12/12/2023, 1:11 PM
Ok sure.
f

future-teacher-7046

12/12/2023, 5:58 PM
One thing I forgot to ask. What version of the React SDK are you using? The
backgroundSync
option was added in version
0.18.0
, so if you are using an earlier version it won't work.
n

narrow-spoon-80536

12/13/2023, 4:42 AM
Oh, Okay. I using 0.17.0 and that might be the reason. I will update it to latest.
Thanks
3 Views