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.

If knox gets timeout, node.js server process gets killed

See original GitHub issue

Hope i’m not duplicating anything but when i try to get many files from S3 the server gets killed randomly. It works most of the time but sometimes when a socket fails the whole server is dead.

The error is:

events.js:72
        throw er; // Unhandled 'error' event
              ^
Error: read ECONNRESET
    at errnoException (net.js:901:11)
    at TCP.onread (net.js:556:19)

Issue Analytics

  • State:closed
  • Created 10 years ago
  • Comments:6 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
nevillcommented, Oct 7, 2013

@refaelos No, this issue is caused by an uncaught error event, as noted here:

Error events are treated as a special case in node. If there is no listener for it, then the default action is to print a stack trace and exit the program.

I guess you called putFile without handling the error event as me. The simple fix is to handle it.

var emitter = knoxClient.putFile(...)

emitter.once('error', errorHandler)
0reactions
nevillcommented, Oct 14, 2013

Swallowing any errors sounds like a good idea, but I am afraid it might be a bug because I can see the same error twice. Not sure if it’s the same thing as you mentioned in #1

Read more comments on GitHub >

github_iconTop Results From Across the Web

How do I shut down my Express server gracefully when its ...
So when I kill my server by hitting Ctrl+C, it will run into the timeout and print “Could not close connections” after 10...
Read more >
Let It Crash: Best Practices for Handling Node.js Errors on ...
We'll need to use a timeout to build a system to indicate that if all the connections don't close within a certain limit,...
Read more >
Socket hang up problems - Google Groups
Hi, I've been getting this issue every now and then on a long poll request. It doesn't happen consistently so I'm finding it...
Read more >
Table Of Contents - Apache Knox
The Apache Knox Gateway is a system that provides a single point of authentication and access for Apache Hadoop services in a cluster....
Read more >
How Do I Change the Session Timeout Duration for ... - 华为云
You need to set a proper web session timeout duration for security purposes. ... Usage of the PMS Process Is High · High...
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