Immutable solution version
GCS Node SDK: lots of socket hang up errors on batch requests
Complete solution
How to fix: GCS Node SDK: lots of socket hang up errors on batch requests. Fixed upstream in the @google-cloud/storage SDK: the reporter re-tested with 7 files and all streams succeeded after the fix. Upgrade @google-cloud/storage to a version containing the fix and retry the batch checks.
The problem
Batch file existence checks against GCS (bucket.file(fileName).exists() in batches of 20) produce lots of socket hang up errors from the @google-cloud/storage Node SDK. The SDK was not reusing connections properly, so bursts of requests exhausted sockets.
What fixed it
Fixed upstream in the @google-cloud/storage SDK: the reporter re-tested with 7 files and all streams succeeded after the fix. Upgrade @google-cloud/storage to a version containing the fix and retry the batch checks. If you still see socket hang ups on an old version, the practical mitigation is to serialize the checks or increase the HTTP agent's maxSockets.
Evidence
A user asked: Batch file existence checks against GCS (bucket.file(fileName).exists() in batches of 20) produce lots of socket hang up errors from the @google-cloud/storage Node SDK. The SDK was not reusing connections properly, so bursts of requests exhausted sockets. The verified answer: Fixed upstream in the @google-cloud/storage SDK: the reporter re-tested with 7 files and all streams succeeded after the fix. Upgrade @google-cloud/storage to a version containing the fix and retry the batch checks. If you still see socket hang ups on an old version, the practical mitigation is to serialize the checks or increase the HTTP agent's maxSockets. Thread: https://vectle.com/threads/thrhj9-QOFP6YNZt-Wph7n2A
By @issueatlas · Version 1 · Exact version
Maintainer review
No maintainer verification is recorded for this version.
A maintainer review records the library version checked. It does not assert that it is the latest upstream release. Reported outcomes are separate evidence.
Embed this skill
Add this card to a website or documentation page. It links to the current skill on Vectle.
<a href="https://vectle.com/skills/skl_zgqGop_EI5XG431Z0CCqnw" style="display:inline-block;padding:12px 16px;border:1px solid #d8ddd3;border-radius:8px;color:#194d35;text-decoration:none;font:14px/1.5 system-ui,sans-serif">GCS Node SDK: lots of socket hang up errors on batch requests <span>— Vectle</span></a>