Repository navigation
Closed
Labels
api: storageIssues related to the Cloud Storage API.Issues related to the Cloud Storage API.
Description
Environment details
- OS:
- Node.js version: 8.5.0
- npm version: 5.3.0
- google-cloud-node/storage version: 1.2.1
I have a utlity nodejs script that checks existence of few thousands of files in cloud storage.
I run script locally, so not in Cloud environment.
I'm executing those checks (bucket.file(fileName).exists()) in batch of 20, so not all checks are fired concurrently.
I'm seeing lots of these errors when trying to run script:
{ Error: socket hang up
at TLSSocket.onHangUp (_tls_wrap.js:1140:19)
at Object.onceWrapper (events.js:314:30)
at emitNone (events.js:110:20)
at TLSSocket.emit (events.js:207:7)
at endReadableNT (_stream_readable.js:1059:12)
at _combinedTickCallback (internal/process/next_tick.js:138:11)
at process._tickCallback (internal/process/next_tick.js:180:9)
code: 'ECONNRESET',
path: null,
host: 'accounts.google.com',
port: 443,
localAddress: undefined }
and these:
{ Error: read ECONNRESET
at _errnoException (util.js:1026:11)
at TLSWrap.onread (net.js:606:25) code: 'ECONNRESET', errno: 'ECONNRESET', syscall: 'read' }
aaand these:
{ Error: socket hang up
at createHangUpError (_http_client.js:345:15)
at TLSSocket.socketOnEnd (_http_client.js:437:23)
at emitNone (events.js:110:20)
at TLSSocket.emit (events.js:207:7)
at endReadableNT (_stream_readable.js:1059:12)
at _combinedTickCallback (internal/process/next_tick.js:138:11)
at process._tickCallback (internal/process/next_tick.js:180:9) code: 'ECONNRESET' }
I have added this fix (suggested here: #2254):
const gcs = storage();
//https://github.com/GoogleCloudPlatform/google-cloud-node/issues/2254
gcs.interceptors.push({
request: function(reqOpts) {
reqOpts.forever = false;
return reqOpts
}
});
I have tried to reduce the check batch size, but it didn't have any effect.
Reacted by Micah Stubbs, Franco Gilio, Sean Pollock and mike-seekwell
Metadata
Metadata
Assignees
Labels
api: storageIssues related to the Cloud Storage API.Issues related to the Cloud Storage API.
Activity
stephenplusplus commentedon Sep 21, 2017
Can you share a small gist or repo that I can use to try to reproduce?
ovaris commentedon Sep 21, 2017
Here's gist, hopefully it makes sense: https://gist.github.com/ovaris/c30c492db06fbe73875ed71d00dcb547
stephenplusplus commentedon Sep 21, 2017
It's a bit hard to go from that, since I can't tap into the firebase instance. Can you try to replicate the problem without any external dependencies?
lukesneeringer commentedon Sep 21, 2017
This issue was moved to googleapis/nodejs-storage#27
build: make docs check not required (#2623)