Getting [ioredis] Unhandled error event: ReplyError: ERR max number of clients reached
Any ideas why?
Solution:Jump to solution
youre trying to exceed the max clients allowable, this is a limitation of redis itself and not due to anything railway related.
make sure to close connections when youre done with them.
maybe look into how you could go about using pooling instead of a new client for every request....
25 Replies
Project ID:
N/A
![No description](https://cdn.answeroverflow.com/1179307091501011016/Screenshot_2023-11-29_at_11.55.12_AM.png)
can i see your connection constructor please?
and we consume something like this
@Brody
no need for the ping please
here is the prod endpoint breaking, aka ~ millions of request broke from yesterday night
https://api.hey.xyz/preference/getPreferences?id=0x01b69c
it works fine with local redis
i mean where you testing millions of requests locally too haha
but what version of redis are you using locally?
its 7.2.3 on local
im not testing millions of req locally, but for like a week its fine on railway it broke suddenly even we didnt push any changes
are you using a depricated redis plugin or a redis service on railway?
no, not using any plugins
its raw redis provided by railway
imo its not with the code, i see same error on medis ui too
![No description](https://cdn.answeroverflow.com/1179311183174578216/image.png)
not quite what i asked, but i understand the plugin word i used can cause misinterpretation, so let me rephrase.
does your redis database have a volume?
yup yup lemme grab screenshot
![No description](https://cdn.answeroverflow.com/1179311581411168286/Screenshot_2023-11-29_at_12.13.05_PM.png)
this is the max client count
![No description](https://cdn.answeroverflow.com/1179311640034938970/image.png)