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.

Exception on stream timeout

See original GitHub issue

Just got a strange restart on a server and, when I looked in the logs, it was due to a timeout on the winston-papertrail<>papertrail stream. I think this is solved by #46 on line 170

The stacktrace (with longjohn enabled):

  stack:
   [ 'Error: connect ETIMEDOUT',
     '    at errnoException (net.js:901:11)',
     '    at Object.afterConnect [as oncomplete] (net.js:892:19)',
     '---------------------------------------------',
     '    at Socket.Readable.on (_stream_readable.js:689:33)',
     '    at CleartextStream.connectStream (/home/nodeapps/my-node-app/node_modules/winston-papertrail/lib/winston-papertrail.js:173:24)',
     '    at CleartextStream.EventEmitter.emit (events.js:117:20)',
     '    at _stream_readable.js:920:16',
     '    at process._tickCallback (node.js:415:13)',
     '---------------------------------------------',
     '    at CleartextStream.Readable.on (_stream_readable.js:689:33)',
     '    at wireStreams (/home/nodeapps/my-node-app/node_modules/winston-papertrail/lib/winston-papertrail.js:152:29)',
     '    at Socket.<anonymous> (/home/nodeapps/my-node-app/node_modules/winston-papertrail/lib/winston-papertrail.js:170:21)',
     '    at Socket.g (events.js:180:16)',
     '    at Socket.EventEmitter.emit (events.js:92:17)',
     '    at Object.afterConnect [as oncomplete] (net.js:883:10)',
     '---------------------------------------------',
     '    at Socket.connect (net.js:800:10)',
     '    at Object.exports.connect.exports.createConnection (net.js:94:35)',
     '    at CleartextStream.connectStream (/home/nodeapps/my-node-app/node_modules/winston-papertrail/lib/winston-papertrail.js:162:34)',
     '    at CleartextStream.EventEmitter.emit (events.js:117:20)',
     '    at _stream_readable.js:920:16',
     '    at process._tickCallback (node.js:415:13)',
     '---------------------------------------------',
     '    at CleartextStream.Readable.on (_stream_readable.js:689:33)',
     '    at wireStreams (/home/nodeapps/my-node-app/node_modules/winston-papertrail/lib/winston-papertrail.js:152:29)',
     '    at Socket.<anonymous> (/home/nodeapps/my-node-app/node_modules/winston-papertrail/lib/winston-papertrail.js:170:21)',
     '    at Socket.g (events.js:180:16)',
     '    at Socket.EventEmitter.emit (events.js:92:17)',
     '    at Object.afterConnect [as oncomplete] (net.js:883:10)',
     '---------------------------------------------',
     '    at Socket.connect (net.js:800:10)',
     '    at Object.exports.connect.exports.createConnection (net.js:94:35)',
     '    at CleartextStream.connectStream (/home/nodeapps/my-node-app/node_modules/winston-papertrail/lib/winston-papertrail.js:162:34)',
     '    at CleartextStream.EventEmitter.emit (events.js:117:20)',
     '    at _stream_readable.js:920:16',
     '    at process._tickCallback (node.js:415:13)',
     '---------------------------------------------',
     '    at CleartextStream.Readable.on (_stream_readable.js:689:33)',
     '    at wireStreams (/home/nodeapps/my-node-app/node_modules/winston-papertrail/lib/winston-papertrail.js:152:29)',
     '    at Socket.<anonymous> (/home/nodeapps/my-node-app/node_modules/winston-papertrail/lib/winston-papertrail.js:170:21)',
     '    at Socket.g (events.js:180:16)',
     '    at Socket.EventEmitter.emit (events.js:92:17)',
     '    at Object.afterConnect [as oncomplete] (net.js:883:10)',
     '---------------------------------------------',
     '    at Socket.connect (net.js:800:10)',
     '    at Object.exports.connect.exports.createConnection (net.js:94:35)',
     '    at CleartextStream.connectStream (/home/nodeapps/my-node-app/node_modules/winston-papertrail/lib/winston-papertrail.js:162:34)',
     '    at CleartextStream.EventEmitter.emit (events.js:117:20)',
     '    at _stream_readable.js:920:16',
     '    at process._tickCallback (node.js:415:13)',
     '---------------------------------------------',
     '    at CleartextStream.Readable.on (_stream_readable.js:689:33)',
     '    at wireStreams (/home/nodeapps/my-node-app/node_modules/winston-papertrail/lib/winston-papertrail.js:152:29)',
     '    at Socket.<anonymous> (/home/nodeapps/my-node-app/node_modules/winston-papertrail/lib/winston-papertrail.js:170:21)',
     '    at Socket.g (events.js:180:16)',
     '    at Socket.EventEmitter.emit (events.js:92:17)',
     '    at Object.afterConnect [as oncomplete] (net.js:883:10)',
     '---------------------------------------------',
     '    at Socket.connect (net.js:800:10)',
     '    at Object.exports.connect.exports.createConnection (net.js:94:35)',
     '    at CleartextStream.connectStream (/home/nodeapps/my-node-app/node_modules/winston-papertrail/lib/winston-papertrail.js:162:34)',
     '    at CleartextStream.EventEmitter.emit (events.js:117:20)',
     '    at _stream_readable.js:920:16',
     '    at process._tickCallback (node.js:415:13)' ] }

Issue Analytics

  • State:closed
  • Created 8 years ago
  • Comments:11 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
ludobluescommented, Jun 24, 2016

My bad, the timeout was coming from my company’s proxy…

1reaction
kevin-frugiercommented, Jun 17, 2016

@troy : I have just deployed a version of my product targeting kenperkins/winston-papertrail#a8f0451dddefd26775551ac7251b175924568796 (the head of master around the time you asked me to try it out). I’ll see how it behaves and report here of any improvement or continued drops.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Java 8 Streams - Timeout? - Stack Overflow
@Hatefiend The exception is only thrown once after 30 seconds. I think the overhead of creating and throwing the exception there is negligible....
Read more >
completionTimeout - Documentation - Akka
If the completion of the stream does not happen until the provided timeout, the stream is failed with a TimeoutException . Time aware...
Read more >
Timeout exception when using Simple Message Stream ...
Timeout exceptions indicate that a grain call is taking longer than 30 seconds. This could be due to overloading the grain or the...
Read more >
WCF Timeout exception on streaming big files - MSDN
I'm currently working on a WCF streaming service. So far everything works great for files up to 2 GB. I've set up the...
Read more >
timeout method - Stream class - dart:async library - Dart API
If onTimeout is omitted, a timeout will just put a TimeoutException into the error channel of the returned stream. If the call to...
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