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.

[ioredis] Unhandled error event

See original GitHub issue

ioredis cluster client will print out connection issues even if I register to error handler.

console.error('[ioredis] Unhandled error event:', error.stack);

Even when your cluster redis instance registered for ‘error’ or ‘node error’. Look like getInfoFromNode duplicates Redis instance, the current duplicate implementation does not close the event listeners. Any error on the cloned instance will fall to the console.log.

This is an issue as when there are connection problems the process prints out to the console and doesn’t trigger the event on the cluster instance.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:2
  • Comments:9

github_iconTop GitHub Comments

1reaction
bakdakonusuruzcommented, Mar 25, 2021

Hi all, I’m having this error quite frequently

[ioredis] Unhandled error event: Error: write EPIPE
afterWriteDispatched (internal/stream_base_commons.js:156:25)
writeGeneric (internal/stream_base_commons.js:147:3)
Socket._writeGeneric (net.js:785:11)
Socket._write (net.js:797:8)
writeOrBuffer (_stream_writable.js:352:12)
Socket.Writable.write (_stream_writable.js:303:10)
Redis.sendCommand (/app/node_modules/ioredis/built/redis/index.js:659:33)
Redis.info (/app/node_modules/ioredis/built/commander.js:111:25)
Redis._readyCheck (/app/node_modules/ioredis/built/redis/index.js:475:10)
Socket.<anonymous> (/app/node_modules/ioredis/built/redis/event_handler.js:54:18)
Object.onceWrapper (events.js:421:28)
Socket.emit (events.js:327:22)
TCPConnectWrap.afterConnect [as oncomplete] (net.js:1132:10)
1reaction
ioredis-robotcommented, Jul 19, 2019

🎉 This issue has been resolved in version 4.13.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Read more comments on GitHub >

github_iconTop Results From Across the Web

ioredis Unhandled error event: Error: connect ETIMEDOUT
This is occurring for instantiating only Standalone Redis object in node js. Below is the code I am using, var publisher = new...
Read more >
[ioredis] Unhandled error event: Error · Issue #444 - GitHub
The error is very vague [ioredis] Unhandled error event: Error I checked the redis server and it's working fine. var redis = new ......
Read more >
ioredis - npm
Sophisticated error handling strategy. Supports NAT mapping. Supports autopipelining. 100% written in TypeScript and official declarations ...
Read more >
Heroku won't connect to redis to go [ioredis] Unhandled error ...
Heroku won't connect to redis to go [ioredis] Unhandled error event: Error: connect ECONNREFUSED 127.0.0.1:6379.
Read more >
Laravel-echo-server, Redis and Ubuntu 18.04.4 [ioredis] Error
... connects very fast and after few seconds I start to receive this error in console: [ioredis] Unhandled error event: Error: connect ETIMEDOUT...
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