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
{{ message }}
Repository navigation
Getting ESOCKETTIMEOUT when streaming through file.createReadStream() #2317
We transform a large binary file (>150MB up to GBs) and publish the data to pubsub.
OS: Google App Engine (Assuming its windows)
Node.js version: LTS
npm version: LTS
google-cloud-node version: HEAD
Steps to reproduce
require google-cloud
let file = bucket.file([largebinaryfile]);
let readStream = file.createReadStream();
file.pipe(transformStream).pipe(writeStream)
readStream: Reads large file from bucket directly from bucket
transformStream: Does some operation
writeStream: publishes transformed data to cloud pubsub
Problem,
readStream receives ESOCKETTIMEDOUT error more often, how to handle this is this value configurable through code?
Hey there, thought I would chime in here before opening a new issue in the nodejs-storage repo. I got the exact same issue on version 2.0.1.
Here is the code producing the error:
constreadline=require('readline');conststorage=newStorage({projectId: config.projectId});constbucket=storage.bucket(config.bucketName);constremoteFile=bucket.file('events.txt');constlineReader=readline.createInterface(remoteFile.createReadStream());lineReader.on('line',/* do stuff */);
The code runs on GCE:
OS: Linux 4.9.0-8-amd64 SMP Debian 4.9.110-3+deb9u3 (2018-08-19) x86_64 GNU/Linux
node: v8.11.4
It reliably times out after 60 seconds of streaming.
Activity
stephenplusplus commentedon May 17, 2017
Can you double check the version of
google-cloud-nodethat you're using? Only the latest release will retry on errors such as a socket timeout.MuthuD commentedon May 17, 2017
Hi Stephen,
Thanks for the response.
I'm using version @google-cloud/storage: "0.7.0"
I will try with version 1.1.1 and let you know if there is any issue.
Thanks
stephenplusplus commentedon May 22, 2017
@MuthuD how did it go?
Scarysize commentedon Sep 11, 2018
Hey there, thought I would chime in here before opening a new issue in the
nodejs-storagerepo. I got the exact same issue on version 2.0.1.Here is the code producing the error:
The code runs on GCE:
It reliably times out after 60 seconds of streaming.
Let me know if you need any further information.
JustinBeckwith commentedon Sep 11, 2018
Thanks! Opening this on the nodejs-storage repo is absolutely the way to go though 👍
Scarysize commentedon Sep 12, 2018
👍 Okay, added a comment to a similar issue: googleapis/nodejs-storage#27 (comment)