-
Notifications
You must be signed in to change notification settings - Fork 2.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Having multiple watchQuery observables on the page causes an inifite number of rapid requests #6943
Comments
Yes, I can confirm this issue but in a little bit different condition: using pollInterval, in case if multiple queries (pollInterval applied) are used on the same page. |
#6760 (comment) Here is some more info on something they changed in 3.1. If you set I really think they should have communicated this a bit better, seeing the impact this can have on some servers |
@JesseZomer Thanks for shedding some more light on the problem. |
Same issue. According to our tests, this has been introduced to our code base when we did upgrade from 3.1.3 to 3.1.4. The issue seems still present on 3.1.5, hasn't tested 3.2.0 yet. |
I've created a new reporduction with 3.2.0 https://stackblitz.com/edit/apollo-watch-query-infinite-3-2 I'm leaving this issue open because, imho, a configuration where the front-end fires an infinite number of requests rendering the backend irresponsive should not be possible under any circumstances, because the results are too severe in a production environment and is not always detectable in development. |
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
v3.1.x of apollo client introduced an odd issue in our software where having multiple
watchQuery
observables on the page causes it to make 10s of http requests per second an infinite number of times.Intended outcome:
To make a single http request per
watchQuery
observable.Actual outcome:
10s of requests are made to the server per second infinitely.
How to reproduce the issue:
I've created a minimal reporoduction of the issue, note I've mocked the http request but the original issue was happenning with a real backend.
https://stackblitz.com/edit/apollo-watch-query-infinite
Versions
System:
OS: Windows 10 10.0.18363
Binaries:
Node: 12.13.1 - C:\Program Files\nodejs\node.EXE
Yarn: 1.22.0 - ~\AppData\Roaming\npm\yarn.CMD
npm: 6.12.1 - C:\Program Files\nodejs\npm.CMD
Browsers:
Chrome: 81.0.4044.92
Edge: Spartan (44.18362.449.0)
The text was updated successfully, but these errors were encountered: