You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When running Octokit with auth, and trying to concurrently perform 10+ operations, a deadlock will happen.
The reason: https://github.com/octokit/plugin-throttling.js/blob/main/src/index.ts#L30
10 concurrent in global. If this buffer is filled with 10 requests, and no auth token is present, the auth request will end up as number 11, and never run, again causing the 10 requests in the queue to wait forever.
By reducing the array to 9 elements, it works.
By awaiting a single request before looping, it works (remove the comment before the loop, this will get a token and cache it).
By changing maxConcurrent to 11, it works.
I think it would be a good idea to let auth requests have its own queue, and not end up in the global one.
The text was updated successfully, but these errors were encountered:
When running Octokit with auth, and trying to concurrently perform 10+ operations, a deadlock will happen.
The reason: https://github.com/octokit/plugin-throttling.js/blob/main/src/index.ts#L30
10 concurrent in global. If this buffer is filled with 10 requests, and no auth token is present, the auth request will end up as number 11, and never run, again causing the 10 requests in the queue to wait forever.
Example code to reproduce:
This will hang forever.
By reducing the array to 9 elements, it works.
By awaiting a single request before looping, it works (remove the comment before the loop, this will get a token and cache it).
By changing maxConcurrent to 11, it works.
I think it would be a good idea to let auth requests have its own queue, and not end up in the global one.
The text was updated successfully, but these errors were encountered: