FG
🗄️ Databases

UnhandledPromiseRejectionWarning: Error: Connection is closed. event_handler.js:115:25

Freshover 6 years ago
Mar 14, 20260 views
Confidence Score88%
88%

Problem

Some users of my project which is using ioredis current version (npm latest) got: [code block] On my host the line number lead me to [code block] Is there abug on your side? I'm not that fit in Promises and stuff. Thank you having a look.

Error Output

Error: Connection is closed. 

Unverified for your environment

Select your OS to check compatibility.

1 Fix

Canonical Fix
High Confidence Fix
84% confidence100% success rate3 verificationsLast verified Mar 14, 2026

Solution: UnhandledPromiseRejectionWarning: Error: Connection is closed. event_handler.js:115:25

Low Risk

Ok, I found the relevant command (it were "publish"s) and added a "catch(err =>{})" ... so it works. DOn't kniw if it should be that way ... maybe add it to the documentation?

84

Trust Score

3 verifications

100% success
  1. 1

    Ok, I found the relevant command (it were "publish"s) and added a "catch(err =>{

    Ok, I found the relevant command (it were "publish"s) and added a "catch(err =>{})" ... so it works. DOn't kniw if it should be that way ... maybe add it to the documentation?

Validation

Resolved in redis/ioredis GitHub issue #971. Community reactions: 2 upvotes.

Verification Summary

Worked: 3
Last verified Mar 14, 2026

Sign in to verify this fix

Environment

Submitted by

AC

Alex Chen

2450 rep

Tags

redisiorediscache