question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

TimeoutError: Connection timed out after 10000ms

See original GitHub issue

TimeoutError: Connection timed out after 10000ms

The image is uploaded on s3 with all their sub variations but after uploading i am getting error for Connection timeout

Your environment

  • Operating system
    • Linux
  • Node.js version (node --version)
    • Node.js v6.x
  • ImageMagick version (identify -version)
    • ImageMagick v7.0.x
  • s3-uploader version
    • v2.x

Steps to reproduce

below is my code

var client = new s3Upload(awsbucket, {
    aws: {
        path: 'images/',
        region: 'us-west-2',
        acl: awsACL,
        accessKeyId: awsKeyId,
        secretAccessKey: awsKey,
    },

    cleanup: {
        versions: true,
        original: false
    },

    original: {
        awsImageAcl: 'public-read'
    },

    versions: [{
        maxHeight: 1040,
        maxWidth: 1040,
        format: 'jpg',
        quality: 80,
        suffix: '-large',
        folderPath: 'large/'
    }, {
        maxWidth: 780,
        aspect: '3:2!h',
        suffix: '-medium',
        folderPath: 'medium/'
    }, {
        maxWidth: 320,
        aspect: '16:9!h',
        suffix: '-small',
        folderPath: 'small/'
    }, {
        maxHeight: 250,
        maxWidth: 250,
        aspect: '1:1',
        suffix: '-thumb',
        folderPath: 'thumb/'
    }]
});
var fileCounter = 0;
var filepath = req.file.path;
var filename = req.file.filename;
client.upload(filepath, {}, function (err, versions, meta) {
    if (err) {
        throw err;
    }

    versions.forEach(function (image) {
        fileCounter++;
        console.log(image);
        console.log('versions.length',versions.length);
        console.log('fileCounter',fileCounter);
        //console.log(image.width, image.height, image.url);
        if (fs.existsSync(filepath)) {
            fs.unlinkSync(filepath);
        }
        if (versions.length === fileCounter) {
            var im =image.key.split('/');
            return res.json({success: true, filename: im[im.length - 1]});
        }
        // 1024 760 https://my-bucket.s3.amazonaws.com/path/110ec58a-a0f2-4ac4-8393-c866d813b8d1.jpg
    });
});
and getting error like belwo image
http://i.prntscr.com/62fad87356564e7f9bd3eb3bac93294a.png

Issue Analytics

  • State:open
  • Created 7 years ago
  • Comments:5

github_iconTop GitHub Comments

4reactions
alfiepoleoncommented, Feb 16, 2017

From this aws sdk documentation Try this

  aws: {
    path: '...',
    region: '...',
    acl: '...',
    httpOptions: { timeout: 120000 }, // Play with values here (milliseconds)
    accessKeyId: '...',
    secretAccessKey: '...',
  }
1reaction
abhishekp1996commented, May 31, 2018

By default the region is us-east-1. If you have server in some other location, add the region property in aws key in client object. I solved it this way. Hope this helps. 😃

Read more comments on GitHub >

github_iconTop Results From Across the Web

DAX TimeoutError: Connection timeout after 10000ms
I encounter exactly the same issue in lambda function. I was missing ingress security rules to allow incoming traffic - 8111 (unencrypted) ...
Read more >
How to Fix "Buffering timed out after 10000ms" Error in ...
The buffering timeout is usually due to either registering models on a newly created connection but using mongoose.connect() : const mongoose = ...
Read more >
How to fix cURL error 28: Connection timed out after X ...
In this article, we will show you how to easily fix the 'cURL error 28: Connection timed out' issue on your WordPress website....
Read more >
Timed out after 30000 ms while waiting for a server that ...
If yes, then this is a typical timeout error that is shared across all official drivers, where it tries to connect to the...
Read more >
Why Mongoose Model Operations Time Out | MongoDB bug
mongoose err buffering timeout error after 1000ms | mongodb · The Best Way to Learn to Code · How to Find Freelance Software...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found