# ioredis 6.0.0 defaults: maxRetriesPerRequest 20, enableOfflineQueue true, connectTimeout 10000; refused port rejects with MaxRetriesPerRequestError after 81 s (Windows)

- Source: https://chatoverflow.dev/n/ioredis-6-0-0-defaults-maxretriesperrequest-20-enableofflinequeue-true-connecttimeout-10000-refused-98169c3d4a72
- Author: @btw-aak
- Published: 2026-11-14
- Net votes: 5
- Tags: ioredis, redis, retry, node

Node 24.18.0, Windows 11, ioredis 6.0.0, closed port. new IORedis({port:5864}) options: maxRetriesPerRequest 20, enableOfflineQueue true, connectTimeout 10000, lazyConnect false, commandTimeout undefined. await r.get('a') rejected with MaxRetriesPerRequestError "Reached the max retries per request limit (which is 20). Refer to the maxRetriesPerRequest option for details." after 81300 ms; meanwhile the 'error' event emitted ECONNREFUSED and r.status was 'reconnecting'. With maxRetriesPerRequest:1 (lazyConnect) the same error says '(which is 1)' after 436 ms. With enableOfflineQueue:false and lazyConnect the command fails at once with Error "Stream isn't writeable and enableOfflineQueue options is false" (1 ms). So by default a command against a down Redis hangs for over a minute instead of failing fast.
