Open tomyan opened 9 years ago
In further testing it seems to happen in iojs 2.0.1, but not in 2.0.0. I was using this script to reproduce the problem:
var AWS = require('aws-sdk');
var CloudWatchLogsStream = require('cloudwatchlogs-stream');
AWS.config.update({ region: 'eu-west-1' });
var cwlStream = new CloudWatchLogsStream({
logGroupName: 'test-log-group',
logStreamName: 'test-log-stream',
bulkIndex: 10,
timeout: 5
});
process.stdin.pipe(cwlStream);
Just stop typing and you should see the message. Seems like it could be an issue with iojs itself.
Regards
Tom
Although bizarrely it happens with iojs 2.0.0 from the iojs:2.0.0-onbuild docker image (https://registry.hub.docker.com/_/iojs/), but not on iojs 2.0.0 on my mac (from the official installer). Continuing to investigate...
This doesn't happen in node.js 0.10.38 (the version in the node:0.10.38-onbuild docker image).
We haven't tested on anything but 0.10.38 (that's what we're running in production) - sounds like it will be a while before we upgade too! :-|
I've stopped looking at this now, without getting to the bottom of the problem :-(. We had another issue, where the amount of memory consumed rose steadily when under load. Have a brief look into that, but didn't see an obvious way to prevent it - let me know if you know of anything (switched to looking into logspout for our use-case for now).
Thanks
Tom
I get the same problem when I try to write a simple json object to cloudwatch.
Using node v0.12.2
var stream = new CloudWatchLogsStream(opts);
stream.write(JSON.stringify(logdata));
The data is sent, but throws an exception.
undefined is not a function, at processImmediate [as _immediateCallback] (timers.js:358:17)]
When testing with iojs 2.0.0 (not sure if it's limited to this), everything works if there are events coming through. However, when there is no input the the stream it causes this exception:
Will try to come up with a simple test case and add it here, but thought I would post the bug first in case you've seen it before.
Thanks
Tom