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.

Client waiting endlessly for info from unresponsive server

See original GitHub issue

It appears that in some instances the connection to the server is established but the server will not respond (we are running AWS lambdas and elasticache, which is not really a good marriage).

In this scenario the client is stuck waiting for a response and queuing commands but never making progress or giving up and retrying the connection. Things just halt forever, since no new traffic is sent to detect that the connection is lost.

It can be reproduced by opening a port with netcat and just ignoring incoming traffic (nc -l <port>).

Could a socket timeOut be set up to handle this while waiting for responses?

Issue Analytics

  • State:open
  • Created 5 years ago
  • Comments:21 (4 by maintainers)

github_iconTop GitHub Comments

2reactions
nicokaisercommented, Oct 7, 2019

Adding timeout features to ioredis seems to be a difficult (or unwanted) task, although it is needed in some cases. I solved this by using promise-timeout and wrapping each and every ioredis call. This is not very elegant (and may also lead to internal reference leak when queries do not terminate), but at least I can handle timeouts in HTTP requests this way.

2reactions
luincommented, Jul 6, 2018

Added a pull request trying to address this issue: https://github.com/luin/ioredis/pull/658. What’s your thoughts?

Read more comments on GitHub >

github_iconTop Results From Across the Web

FIX: User mode processes in an application are unresponsive ...
Fixes a problem in which user mode processes may stop responding indefinitely and are unresponsive to Task Manager.
Read more >
Endless 'Waiting for the Server' Startup Screen : r/MagicArena
Was planning on playing in the open today but I can't get into the client. Edit: After trying a few more times, it...
Read more >
Prevent a client from waiting indefinitely for server response
You can do this with a timeout. Ideally the library you're using allows you to set a timeout, but if not you can...
Read more >
NFS file system hangs. New mount attempts hang also. | Support
An NFS mount appears to be hung or stalled indefinitely. New NFS mount attempts, pointing to the same server, may also hang.
Read more >
Why do consoles sometimes hang forever when SSH ...
You can tell the client to terminate but this won't affect the history kept (or not) at the server end. While this doesn't...
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