Automattic / knox

S3 Lib
MIT License
1.74k stars 285 forks source link

Connections don't seem to be getting closed #197

Closed scriby closed 11 years ago

scriby commented 11 years ago

I'm working on something that uploads a few thousand files to s3, and am continually having issues with network errors. I'm using knox in a pretty vanilla way, just using all the defaults (no agent, SSL, etc.)

I was attempting to do several uploads in parallel, but I dropped it down to one at a time which has been more reliable. But even when doing a single upload at a time, it seems like I have a bunch of connections that aren't closing.

This output is after running my program for about a minute. Eventually these build up, I run out file descriptors, and node starts throwing various errors.

localhost:~ cscribner$ netstat -a | grep aws
tcp4       0    182  192.168.1.105.53531    s3-1-w.amazonaws.https ESTABLISHED
tcp4       0      0  192.168.1.105.53530    s3-1-w.amazonaws.https ESTABLISHED
tcp4       0      0  192.168.1.105.53529    s3-1-w.amazonaws.https ESTABLISHED
tcp4       0      0  192.168.1.105.53528    s3-1-w.amazonaws.https ESTABLISHED
tcp4       0      0  192.168.1.105.53527    s3-1-w.amazonaws.https ESTABLISHED
tcp4       0      0  192.168.1.105.53526    s3-1-w.amazonaws.https ESTABLISHED
tcp4       0      0  192.168.1.105.53525    s3-1-w.amazonaws.https ESTABLISHED
tcp4       0      0  192.168.1.105.53524    s3-1-w.amazonaws.https ESTABLISHED
tcp4       0      0  192.168.1.105.53523    s3-1-w.amazonaws.https ESTABLISHED
tcp4       0      0  192.168.1.105.53522    s3-1-w.amazonaws.https ESTABLISHED
tcp4       0      0  192.168.1.105.53521    s3-1-w.amazonaws.https ESTABLISHED
tcp4       0      0  192.168.1.105.53520    s3-1-w.amazonaws.https ESTABLISHED
tcp4       0      0  192.168.1.105.53519    s3-1-w.amazonaws.https ESTABLISHED
tcp4       0      0  192.168.1.105.53518    s3-1-w.amazonaws.https ESTABLISHED
tcp4       0      0  192.168.1.105.53517    s3-1-w.amazonaws.https ESTABLISHED
tcp4       0      0  192.168.1.105.53516    s3-1-w.amazonaws.https ESTABLISHED
tcp4       0      0  192.168.1.105.53515    s3-1-w.amazonaws.https ESTABLISHED
tcp4       0      0  192.168.1.105.53514    s3-1-w.amazonaws.https ESTABLISHED
tcp4       0      0  192.168.1.105.53513    s3-1-w.amazonaws.https ESTABLISHED
tcp4       0      0  192.168.1.105.53512    s3-1-w.amazonaws.https ESTABLISHED
tcp4       0      0  192.168.1.105.53511    s3-1-w.amazonaws.https ESTABLISHED
tcp4       0      0  192.168.1.105.53510    s3-1-w.amazonaws.https ESTABLISHED
tcp4       0      0  192.168.1.105.53509    s3-1-w.amazonaws.https ESTABLISHED
tcp4       0      0  192.168.1.105.53508    s3-1-w.amazonaws.https ESTABLISHED
tcp4       0      0  192.168.1.105.53507    s3-1-w.amazonaws.https ESTABLISHED
tcp4       0      0  192.168.1.105.53506    s3-1-w.amazonaws.https ESTABLISHED
tcp4       0      0  192.168.1.105.53505    s3-1-w.amazonaws.https ESTABLISHED
tcp4       0      0  192.168.1.105.53504    s3-1-w.amazonaws.https ESTABLISHED
tcp4       0      0  192.168.1.105.53503    s3-1-w.amazonaws.https ESTABLISHED
tcp4       0      0  192.168.1.105.53502    s3-1-w.amazonaws.https ESTABLISHED
tcp4       0      0  192.168.1.105.53501    s3-1-w.amazonaws.https ESTABLISHED
tcp4       0      0  192.168.1.105.53500    s3-1-w.amazonaws.https ESTABLISHED
tcp4       0      0  192.168.1.105.53499    s3-1-w.amazonaws.https ESTABLISHED
tcp4       0      0  192.168.1.105.53498    s3-1-w.amazonaws.https ESTABLISHED
tcp4       0      0  192.168.1.105.53497    s3-1-w.amazonaws.https ESTABLISHED
tcp4       0      0  192.168.1.105.53496    s3-1-w.amazonaws.https ESTABLISHED
tcp4       0      0  192.168.1.105.53495    s3-1-w.amazonaws.https ESTABLISHED
tcp4       0      0  192.168.1.105.53494    s3-1-w.amazonaws.https ESTABLISHED
tcp4       0      0  192.168.1.105.53493    s3-1-w.amazonaws.https ESTABLISHED
tcp4       0      0  192.168.1.105.53492    s3-1-w.amazonaws.https ESTABLISHED
tcp4       0      0  192.168.1.105.53491    s3-1-w.amazonaws.https ESTABLISHED
tcp4       0      0  192.168.1.105.53490    s3-1-w.amazonaws.https ESTABLISHED
tcp4       0      0  192.168.1.105.53489    s3-1-w.amazonaws.https ESTABLISHED
tcp4       0      0  192.168.1.105.53488    s3-1-w.amazonaws.https ESTABLISHED
tcp4       0      0  192.168.1.105.53487    s3-1-w.amazonaws.https ESTABLISHED
tcp4       0      0  192.168.1.105.53486    s3-1-w.amazonaws.https ESTABLISHED
tcp4       0      0  192.168.1.105.53485    s3-1-w.amazonaws.https ESTABLISHED
tcp4       0      0  192.168.1.105.53484    s3-1-w.amazonaws.https ESTABLISHED
tcp4       0      0  192.168.1.105.53483    s3-1-w.amazonaws.https ESTABLISHED
tcp4       0      0  192.168.1.105.53482    s3-1-w.amazonaws.https ESTABLISHED
tcp4       0      0  192.168.1.105.53481    s3-1-w.amazonaws.https ESTABLISHED
tcp4       0      0  192.168.1.105.53480    s3-1-w.amazonaws.https ESTABLISHED
tcp4       0      0  192.168.1.105.53479    s3-1-w.amazonaws.https ESTABLISHED
tcp4       0      0  192.168.1.105.53478    s3-1-w.amazonaws.https ESTABLISHED
tcp4       0      0  192.168.1.105.53477    s3-1-w.amazonaws.https ESTABLISHED
tcp4       0      0  192.168.1.105.53476    s3-1-w.amazonaws.https ESTABLISHED
tcp4       0      0  192.168.1.105.53475    s3-1-w.amazonaws.https ESTABLISHED
tcp4       0      0  192.168.1.105.53474    s3-1-w.amazonaws.https ESTABLISHED
tcp4       0      0  192.168.1.105.53473    s3-1-w.amazonaws.https ESTABLISHED
tcp4       0      0  192.168.1.105.53472    s3-1-w.amazonaws.https ESTABLISHED
tcp4       0      0  192.168.1.105.53471    s3-1-w.amazonaws.https ESTABLISHED
tcp4       0      0  192.168.1.105.53470    s3-1-w.amazonaws.https ESTABLISHED
tcp4       0      0  192.168.1.105.53469    s3-1-w.amazonaws.https ESTABLISHED
tcp4       0      0  192.168.1.105.53468    s3-1-w.amazonaws.https ESTABLISHED
tcp4       0      0  192.168.1.105.53467    s3-1-w.amazonaws.https ESTABLISHED
tcp4       0      0  192.168.1.105.53466    s3-1-w.amazonaws.https ESTABLISHED
tcp4       0      0  192.168.1.105.53465    s3-1-w.amazonaws.https ESTABLISHED
tcp4       0      0  192.168.1.105.53464    s3-1-w.amazonaws.https ESTABLISHED
tcp4       0      0  192.168.1.105.53463    s3-1-w.amazonaws.https ESTABLISHED
tcp4       0      0  192.168.1.105.53462    s3-1-w.amazonaws.https ESTABLISHED
tcp4       0      0  192.168.1.105.53461    s3-1-w.amazonaws.https ESTABLISHED
tcp4       0      0  192.168.1.105.53460    s3-1-w.amazonaws.https ESTABLISHED
tcp4       0      0  192.168.1.105.53459    s3-1-w.amazonaws.https ESTABLISHED
tcp4       0      0  192.168.1.105.53458    s3-1-w.amazonaws.https ESTABLISHED
tcp4       0      0  192.168.1.105.53457    s3-1-w.amazonaws.https ESTABLISHED
tcp4       0      0  192.168.1.105.53456    s3-1-w.amazonaws.https ESTABLISHED
tcp4       0      0  192.168.1.105.53455    s3-1-w.amazonaws.https ESTABLISHED
tcp4       0      0  192.168.1.105.53453    s3-1-w.amazonaws.https ESTABLISHED
tcp4       0      0  192.168.1.105.53452    s3-1-w.amazonaws.https ESTABLISHED
tcp4       0      0  192.168.1.105.53451    s3-1-w.amazonaws.https ESTABLISHED
tcp4       0      0  192.168.1.105.53450    s3-1-w.amazonaws.https ESTABLISHED
tcp4       0      0  192.168.1.105.53449    s3-1-w.amazonaws.https ESTABLISHED
tcp4       0      0  192.168.1.105.53448    s3-1-w.amazonaws.https ESTABLISHED
tcp4       0      0  192.168.1.105.53447    s3-1-w.amazonaws.https ESTABLISHED
tcp4       0      0  192.168.1.105.53446    s3-1-w.amazonaws.https ESTABLISHED
tcp4       0      0  192.168.1.105.53444    s3-1-w.amazonaws.https ESTABLISHED
tcp4       0      0  192.168.1.105.53439    s3-1-w.amazonaws.https ESTABLISHED
tcp4       0      0  192.168.1.105.53438    s3-1-w.amazonaws.https ESTABLISHED
tcp4       0      0  192.168.1.105.53436    s3-1-w.amazonaws.https ESTABLISHED
tcp4       0      0  192.168.1.105.53435    s3-1-w.amazonaws.https ESTABLISHED
tcp4       0      0  192.168.1.105.53434    s3-1-w.amazonaws.https ESTABLISHED
tcp4       0      0  192.168.1.105.53433    s3-1-w.amazonaws.https ESTABLISHED
tcp4       0      0  192.168.1.105.53432    s3-1-w.amazonaws.https ESTABLISHED
tcp4       0      0  192.168.1.105.53431    s3-1-w.amazonaws.https ESTABLISHED
tcp4       0      0  192.168.1.105.53428    s3-1-w.amazonaws.https ESTABLISHED
tcp4       0      0  192.168.1.105.53427    s3-1-w.amazonaws.https ESTABLISHED
tcp4       0      0  192.168.1.105.53426    s3-1-w.amazonaws.https ESTABLISHED
tcp4       0      0  192.168.1.105.53425    s3-1-w.amazonaws.https ESTABLISHED
tcp4       0      0  192.168.1.105.53423    s3-1-w.amazonaws.https ESTABLISHED
tcp4       0      0  192.168.1.105.53422    s3-1-w.amazonaws.https ESTABLISHED
tcp4       0      0  192.168.1.105.53421    s3-1-w.amazonaws.https ESTABLISHED
tcp4       0      0  192.168.1.105.53419    s3-1-w.amazonaws.https ESTABLISHED
tcp4       0      0  192.168.1.105.53418    s3-1-w.amazonaws.https ESTABLISHED
tcp4       0      0  192.168.1.105.53417    s3-1-w.amazonaws.https ESTABLISHED
tcp4       0      0  192.168.1.105.53416    s3-1-w.amazonaws.https ESTABLISHED
tcp4       0      0  192.168.1.105.53415    s3-1-w.amazonaws.https ESTABLISHED
tcp4       0      0  192.168.1.105.53414    s3-1-w.amazonaws.https ESTABLISHED
tcp4       0      0  192.168.1.105.53413    s3-1-w.amazonaws.https ESTABLISHED
tcp4       0      0  192.168.1.105.53412    s3-1-w.amazonaws.https ESTABLISHED
tcp4       0      0  192.168.1.105.53411    s3-1-w.amazonaws.https ESTABLISHED
tcp4       0      0  192.168.1.105.53410    s3-1-w.amazonaws.https ESTABLISHED
tcp4       0      0  192.168.1.105.53409    s3-1-w.amazonaws.https ESTABLISHED
tcp4       0      0  192.168.1.105.53406    s3-1-w.amazonaws.https ESTABLISHED
tcp4       0      0  192.168.1.105.53405    s3-1-w.amazonaws.https ESTABLISHED
tcp4       0      0  192.168.1.105.53404    s3-1-w.amazonaws.https ESTABLISHED
tcp4       0      0  192.168.1.105.53403    s3-1-w.amazonaws.https ESTABLISHED
tcp4       0      0  192.168.1.105.53402    s3-1-w.amazonaws.https ESTABLISHED
tcp4       0      0  192.168.1.105.53401    s3-1-w.amazonaws.https ESTABLISHED
tcp4       0      0  192.168.1.105.53400    s3-1-w.amazonaws.https ESTABLISHED
tcp4       0      0  192.168.1.105.53399    s3-1-w.amazonaws.https ESTABLISHED
tcp4       0      0  192.168.1.105.53398    s3-1-w.amazonaws.https ESTABLISHED
tcp4       0      0  192.168.1.105.53397    s3-1-w.amazonaws.https ESTABLISHED
tcp4       0      0  192.168.1.105.53396    s3-1-w.amazonaws.https ESTABLISHED
tcp4       0      0  192.168.1.105.53395    s3-1-w.amazonaws.https ESTABLISHED
tcp4       0      0  192.168.1.105.53394    s3-1-w.amazonaws.https ESTABLISHED
tcp4       0      0  192.168.1.105.53393    s3-1-w.amazonaws.https ESTABLISHED
tcp4       0      0  192.168.1.105.53392    s3-1-w.amazonaws.https ESTABLISHED
tcp4       0      0  192.168.1.105.53391    s3-1-w.amazonaws.https ESTABLISHED
tcp4       0      0  192.168.1.105.53390    s3-1-w.amazonaws.https ESTABLISHED
tcp4       0      0  192.168.1.105.53389    s3-1-w.amazonaws.https ESTABLISHED
tcp4       0      0  192.168.1.105.53388    s3-1-w.amazonaws.https ESTABLISHED
tcp4       0      0  192.168.1.105.53387    s3-1-w.amazonaws.https ESTABLISHED
tcp4       0      0  192.168.1.105.53386    s3-1-w.amazonaws.https ESTABLISHED
tcp4       0      0  192.168.1.105.53385    s3-1-w.amazonaws.https ESTABLISHED
tcp4       0      0  192.168.1.105.53384    s3-1-w.amazonaws.https ESTABLISHED
tcp4       0      0  192.168.1.105.53383    s3-1-w.amazonaws.https ESTABLISHED
tcp4       0      0  192.168.1.105.53382    s3-1-w.amazonaws.https ESTABLISHED
tcp4       0      0  192.168.1.105.53381    s3-1-w.amazonaws.https ESTABLISHED
tcp4       0      0  192.168.1.105.53380    s3-1-w.amazonaws.https ESTABLISHED
tcp4       0      0  192.168.1.105.53379    s3-1-w.amazonaws.https ESTABLISHED
tcp4       0      0  192.168.1.105.53378    s3-1-w.amazonaws.https ESTABLISHED
tcp4       0      0  192.168.1.105.53377    s3-1-w.amazonaws.https ESTABLISHED
tcp4       0      0  192.168.1.105.53376    s3-1-w.amazonaws.https ESTABLISHED
tcp4       0      0  192.168.1.105.53375    s3-1-w.amazonaws.https ESTABLISHED
tcp4       0      0  192.168.1.105.53374    s3-1-w.amazonaws.https ESTABLISHED
tcp4       0      0  192.168.1.105.53373    s3-1-w.amazonaws.https ESTABLISHED
tcp4       0      0  192.168.1.105.53372    s3-1-w.amazonaws.https ESTABLISHED
tcp4       0      0  192.168.1.105.53371    s3-1-w.amazonaws.https ESTABLISHED
tcp4       0      0  192.168.1.105.53370    s3-1-w.amazonaws.https ESTABLISHED
tcp4       0      0  192.168.1.105.53369    s3-1-w.amazonaws.https ESTABLISHED
tcp4       0      0  192.168.1.105.53368    s3-1-w.amazonaws.https ESTABLISHED
tcp4       0      0  192.168.1.105.53367    s3-1-w.amazonaws.https ESTABLISHED
tcp4       0      0  192.168.1.105.53366    s3-1-w.amazonaws.https ESTABLISHED
tcp4       0      0  192.168.1.105.53365    s3-1-w.amazonaws.https ESTABLISHED
tcp4       0      0  192.168.1.105.53364    s3-1-w.amazonaws.https ESTABLISHED
tcp4       0      0  192.168.1.105.53363    s3-1-w.amazonaws.https ESTABLISHED
tcp4       0      0  192.168.1.105.53362    s3-1-w.amazonaws.https ESTABLISHED
tcp4       0      0  192.168.1.105.53361    s3-1-w.amazonaws.https ESTABLISHED
tcp4       0      0  192.168.1.105.53360    s3-1-w.amazonaws.https ESTABLISHED
tcp4       0      0  192.168.1.105.53359    s3-1-w.amazonaws.https ESTABLISHED
tcp4       0      0  192.168.1.105.53358    s3-1-w.amazonaws.https ESTABLISHED
tcp4       0      0  192.168.1.105.53357    s3-1-w.amazonaws.https ESTABLISHED
tcp4       0      0  192.168.1.105.53356    s3-1-w.amazonaws.https ESTABLISHED
tcp4       0      0  192.168.1.105.53355    s3-1-w.amazonaws.https ESTABLISHED
tcp4       0      0  192.168.1.105.53354    s3-1-w.amazonaws.https ESTABLISHED
tcp4       0      0  192.168.1.105.53353    s3-1-w.amazonaws.https ESTABLISHED
tcp4       0      0  192.168.1.105.53352    s3-1-w.amazonaws.https ESTABLISHED
tcp4       0      0  192.168.1.105.53351    s3-1-w.amazonaws.https ESTABLISHED
tcp4       0      0  192.168.1.105.53350    s3-1-w.amazonaws.https ESTABLISHED
tcp4       0      0  192.168.1.105.53349    s3-1-w.amazonaws.https ESTABLISHED
tcp4       0      0  192.168.1.105.53348    s3-1-w.amazonaws.https ESTABLISHED
tcp4       0      0  192.168.1.105.53347    s3-1-w.amazonaws.https ESTABLISHED
tcp4       0      0  192.168.1.105.53346    s3-1-w.amazonaws.https ESTABLISHED
tcp4       0      0  192.168.1.105.53345    s3-1-w.amazonaws.https ESTABLISHED
tcp4       0      0  192.168.1.105.53344    s3-1-w.amazonaws.https ESTABLISHED
tcp4       0      0  192.168.1.105.53343    s3-1-w.amazonaws.https ESTABLISHED
tcp4       0      0  192.168.1.105.53342    s3-1-w.amazonaws.https ESTABLISHED
tcp4       0      0  192.168.1.105.53341    s3-1-w.amazonaws.https ESTABLISHED
tcp4       0      0  192.168.1.105.53340    s3-1-w.amazonaws.https ESTABLISHED
tcp4       0      0  192.168.1.105.53339    s3-1-w.amazonaws.https ESTABLISHED
tcp4       0      0  192.168.1.105.53338    s3-1-w.amazonaws.https ESTABLISHED
tcp4       0      0  192.168.1.105.53337    s3-1-w.amazonaws.https ESTABLISHED
tcp4       0      0  192.168.1.105.53336    s3-1-w.amazonaws.https ESTABLISHED
tcp4       0      0  192.168.1.105.53335    s3-1-w.amazonaws.https ESTABLISHED
tcp4       0      0  192.168.1.105.53334    s3-1-w.amazonaws.https ESTABLISHED
tcp4       0      0  192.168.1.105.53333    s3-1-w.amazonaws.https ESTABLISHED
tcp4       0      0  192.168.1.105.53332    s3-1-w.amazonaws.https ESTABLISHED
tcp4       0      0  192.168.1.105.53331    s3-1-w.amazonaws.https ESTABLISHED
tcp4       0      0  192.168.1.105.53330    s3-1-w.amazonaws.https ESTABLISHED
tcp4       0      0  192.168.1.105.53328    s3-1-w.amazonaws.https ESTABLISHED
tcp4       0      0  192.168.1.105.53327    s3-1-w.amazonaws.https ESTABLISHED
tcp4       0      0  192.168.1.105.53326    s3-1-w.amazonaws.https ESTABLISHED
tcp4       0      0  192.168.1.105.53325    s3-1-w.amazonaws.https ESTABLISHED
tcp4       0      0  192.168.1.105.53324    s3-1-w.amazonaws.https ESTABLISHED
tcp4       0      0  192.168.1.105.53323    s3-1-w.amazonaws.https ESTABLISHED
tcp4       0      0  192.168.1.105.53322    s3-1-w.amazonaws.https ESTABLISHED
tcp4       0      0  192.168.1.105.53321    s3-1-w.amazonaws.https ESTABLISHED
tcp4       0      0  192.168.1.105.53320    s3-1-w.amazonaws.https ESTABLISHED
tcp4       0      0  192.168.1.105.53319    s3-1-w.amazonaws.https ESTABLISHED
tcp4       0      0  192.168.1.105.53318    s3-1-w.amazonaws.https ESTABLISHED
tcp4       0      0  192.168.1.105.53317    s3-1-w.amazonaws.https ESTABLISHED
tcp4       0      0  192.168.1.105.53316    s3-1-w.amazonaws.https ESTABLISHED
tcp4       0      0  192.168.1.105.53315    s3-1-w.amazonaws.https ESTABLISHED
tcp4       0      0  192.168.1.105.53314    s3-1-w.amazonaws.https ESTABLISHED
tcp4       0      0  192.168.1.105.53313    s3-1-w.amazonaws.https ESTABLISHED
tcp4       0      0  192.168.1.105.53312    s3-1-w.amazonaws.https ESTABLISHED
tcp4       0      0  192.168.1.105.53311    s3-1-w.amazonaws.https ESTABLISHED
tcp4       0      0  192.168.1.105.53310    s3-1-w.amazonaws.https ESTABLISHED
tcp4       0      0  192.168.1.105.53309    s3-1-w.amazonaws.https ESTABLISHED
tcp4       0      0  192.168.1.105.53308    s3-1-w.amazonaws.https ESTABLISHED
tcp4       0      0  192.168.1.105.53307    s3-1-w.amazonaws.https ESTABLISHED
tcp4       0      0  192.168.1.105.53306    s3-1-w.amazonaws.https ESTABLISHED
tcp4       0      0  192.168.1.105.53305    s3-1-w.amazonaws.https ESTABLISHED
tcp4       0      0  192.168.1.105.53304    s3-1-w.amazonaws.https ESTABLISHED
tcp4       0      0  192.168.1.105.53303    s3-1-w.amazonaws.https ESTABLISHED
tcp4       0      0  192.168.1.105.53302    s3-1-w.amazonaws.https ESTABLISHED
tcp4       0      0  192.168.1.105.53301    s3-1-w.amazonaws.https ESTABLISHED
tcp4       0      0  192.168.1.105.53300    s3-1-w.amazonaws.https ESTABLISHED
tcp4       0      0  192.168.1.105.53299    s3-1-w.amazonaws.https ESTABLISHED

Curious if you guys have ever seen something like this? I'm on node v0.10.15 and using knox 0.8.6.

scriby commented 11 years ago

I experimented with adding a call to "request.abort" in the callback to the request method here: https://github.com/LearnBoost/knox/blob/57c656a17695a59a29c1a8fd243a176c4819e760/lib/client.js#L310.

It fixed the problem in the sense that I never saw more than X sockets open to s3, where X is the number of files I'm uploading in parallel

domenic commented 11 years ago

That does seem very bad. Some sample code would be helpful.

scriby commented 11 years ago
var s3 = knox.createClient({
        key: 'redacted',
        secret: "redacted",
        bucket: "redacted",
        region: 'us-standard'
    });

    var operations = [];

    var walker = walk.walk(webRoot, { followLinks: false });

    walker.on('file', function(root, stat, callback){
        var fileName = stat.name;
        var fullPath = path.join(root, fileName);
        var s3Path = '/' + path.relative(webRoot, fullPath);

        operations.push(function(callback){
            console.log(s3Path);
            s3.putFile(fullPath, s3Path, function(err){
                console.log('done');
                callback(err);
            });
        });

        callback();
    });

    walker.on('end', function(){
        async.forEachLimit(operations, 1, function(operation, callback){
            operation(callback);
        }, function(err){
            if(err){
                console.log(err);
            }
            console.log('Finished uploading web root to s3');
        });
    });
domenic commented 11 years ago

Oh! Well of course. You're getting a response, but completely ignoring it! The second parameter passed to putFiles callback is a response object. You need to resume() it, or read it into a buffer, or some such.

And yes, this is kind of a footgun. Makes #114 seem more urgent...

scriby commented 11 years ago

Haha, I'll give that a try, thanks!

scriby commented 11 years ago

Apparently I can't read:

"// Always either do something with res or at least call res.resume()."

domenic commented 11 years ago

To be fair, we did just add that a couple days ago, and also it's pretty unintuitive. It's kind of a problem with how Node's request/response cycle works, but also kind of a problem with how we are adapting that API into a "simpler" callback API---it's a pretty leaky abstraction, as you can see.

scriby commented 11 years ago

I added a resume and things are quite happy. Want me to close this one out or want to keep it open as a placeholder to reduce the level of astonishment?

domenic commented 11 years ago

Let's close it for now. It was good to help us understand how much of a footgun this is, and will feed into #114.