-
Notifications
You must be signed in to change notification settings - Fork 962
Description
Operating System
Mac OS Sequoia 15.5
Firebase SDK Version
11.10.0
Firebase SDK Product(s)
Auth, Firestore
Project Tooling
React App with Vite
Detailed Problem Description
I've observed that our production application is creating an excessive number of channel requests. We are seeing up to 50 new requests per minute in the browser's network tab, all pointing to Firestore. This behavior occurs even when the user is completely idle. This eventually lead up to over 30k channel calls in a couple of days!
To investigate, I created a minimal reproduction that isolates the Firebase SDK usage (specifically Firestore and Auth). While the rate of new requests is lower in the reproduction due to its simplicity, the number of channel requests still steadily increases over time without any user interaction.
My initial thought was that our data-fetching library, @tanstack/react-query, might be the cause. To rule this out, the reproduction includes two implementations: one using react-query and another using a simple useEffect and useState hook. Both exhibit the same behavior, indicating the issue likely originates within the Firebase SDK.
The reproduction contains a minimal version of our Firebase implementation. If this is caused by an issue in our setup, I would appreciate any guidance on what we need to change.
Thank you for your help!
Steps and code to reproduce issue
Here is the reproduction repo: https://github.com/TimmNL/firestore-channels-reproduction