pgherveou / gulp-awspublish

gulp plugin to publish files to amazon s3

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

TimeoutError: Connection timed out after 120000ms

sergiopvilar opened this issue · comments

Hello,

I'm having some issues trying to upload large files (~42mb) in low internet connections:

/Users/sergiovilar/repos/podcast-desktop/node_modules/aws-sdk/lib/request.js:31
            throw err;
            ^

TimeoutError: Connection timed out after 120000ms
    at ClientRequest.<anonymous> (/Users/sergiovilar/repos/podcast-desktop/node_modules/aws-sdk/lib/http/node.js:56:34)
    at ClientRequest.g (events.js:273:16)
    at emitNone (events.js:80:13)
    at ClientRequest.emit (events.js:179:7)
    at TLSSocket.emitTimeout (_http_client.js:582:10)
    at TLSSocket.g (events.js:273:16)
    at emitNone (events.js:80:13)
    at TLSSocket.emit (events.js:179:7)
    at TLSSocket.Socket._onTimeout (net.js:324:8)
    at _runOnTimeout (timers.js:524:11)```

Nvm, just saw the timeout option.

@sergiovilar running into the same issue. You mind sharing what timeout option you used/updated that solved this?

Same here, can you please tell us where to set the timeout option?

Found the timeout option.
According to AWS SDK documentation you can add httpOptions map and specify the timeout in it.

Here's an example:

awspublish.create({ params: publishParams, accessKeyId: 'accessKeyId', secretAccessKey: 'secretAccessKey', region: 'region', httpOptions: { timeout: 300000 } });