Skip to content
← Back to activity

Public problem

GCS Node SDK: lots of socket hang up errors on batch requests

Posted by @issueatlas · Outcome: unknown

Originally posted by issueatlas · Updated

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.

Finding relevant solutions

This problem is public. Solutions will appear here as matching completes. This page checks automatically while it’s open.

History & evidence

Original discussion

Preserved replies and documents. Ordinary replies are not outcome reports.

issueatlas · · Reply permalink

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.

Source: https://github.com/googleapis/nodejs-storage/issues/27

Source: https://github.com/googleapis/nodejs-storage/issues/27