-
Notifications
You must be signed in to change notification settings - Fork 24
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
Large NPM package response data causes timeout #337
Comments
Go appears to enable compression (gzip) by default on requests. |
Looking into this further, NPM supports HTTP2. I suspect that there is some weird behavior w.r.t timeouts and HTTP2 multiplexing. |
Inspecting the network traffic, there is only 1 connection being opened to This means that the large repos are congesting the single multiplexed HTTP2 connection. While the aggregate of the responses will be received faster than individual HTTP1 connections, each individual response is slower than if it was not multiplexed. Some ideas for improving the performance:
|
Thanks for investigating this @calebbrown! |
- 10 seconds should space out requests more to reduce congestion. - Early requests don't have jitter appled to avoid slowing down small batch sizes. See #337 Signed-off-by: Caleb Brown <[email protected]>
…w. (#340) * Add a threshold so small batches don't have jitter. Bump jitter window. - 10 seconds should space out requests more to reduce congestion. - Early requests don't have jitter appled to avoid slowing down small batch sizes. See #337 Signed-off-by: Caleb Brown <[email protected]> * Switch to a simpler toggle. Signed-off-by: Caleb Brown <[email protected]> --------- Signed-off-by: Caleb Brown <[email protected]>
We still have errors here. Another attempt to reduce this will be to add an LRU cache and ETag "If-None-Match" checking on requets to NPM for a given package. |
After fixes for #139, remaining packages that still cause timeouts all have very large response data sizes (e.g. 6MB)
The text was updated successfully, but these errors were encountered: