Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sometimes errors out on a timeout. #30

Closed
kitsunde opened this issue Jun 13, 2014 · 3 comments
Closed

Sometimes errors out on a timeout. #30

kitsunde opened this issue Jun 13, 2014 · 3 comments

Comments

@kitsunde
Copy link

Running "aws_s3:staging" (aws_s3) task
Uploading to https://s3-ap-southeast-1.amazonaws.com/client-connect-win/
................................................................Fatal error: Failed to upload src/img/bg.png with bucket client-connect-win
Error: Your socket connection to the server was not read from or written to within the timeout period. Idle connections will be closed.�
grunt returned exit code 1action grunt failed

My s3 uploads fail intermittently because of this on this config:

aws_s3: {
      options: {
        accessKeyId: '<%= aws.key %>',
        secretAccessKey: '<%= aws.secret %>',
        region: "<%= aws.region %>",
        uploadConcurrency: 300
      },
      staging: {
        options: {
          bucket: "<%= aws.staging.bucket %>"
        },
        files: [
          {
            expand: true,
            cwd: 'src/',
            src: ['**']
          }
        ]
      }
    },

The file it decided to error out on wasn't even particularly big only 5kb. Any idea on how I can avoid that?

@MathieuLoutre
Copy link
Owner

Hi there!
I've never run into this error before unfortunately. How many files are you uploading? Have you tried changing the uploadConcurrency to something smaller (like 10). I'm suspecting there's a very high number of connections at the same time and maybe AWS doesn't like it?
This issue (although it's for the PHP SDK) seems to say it might be related to concurrency as well: aws/aws-sdk-php#29
Worth a try. Let me know it it worked.

@kitsunde
Copy link
Author

A couple of hundred or so. It seems like this was fixed in aws-sdk a few hours ago: aws/aws-sdk-js#281

@MathieuLoutre
Copy link
Owner

Good spot! I've updated the SDK to the latest version. I did some extensive testing (have a look at the Gruntfile to see what I've done) and I found that with concurrencies over 100 you start running into EMFILE errors (that's for over 300) and ENOTFOUND errors (over 100).

Let me know if you still have problems.

The plugin has been published as 0.9.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants