-
-
Notifications
You must be signed in to change notification settings - Fork 285
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Override reconnectOnError in tsed ioredis module #2668
Comments
Oh, one more thing. I'm not sure if this is going to make sense, but I have copied the registerConnectionProvider to my source base and tested the reconnectOnError, but things didn't change. As I was examining the error, since you are forcing the use of lazyConnect: true and making a connection manually, an error may arise from the connect() function, thus rendering the connection useless. Since our lambda is reusing the instance and thus reusing the broken connection, the error continues to occur when ioredis is used. So, I wrapped the connect() function with a try-catch, since the ioredis internal was using connect().catch(noop) when lazyConnect is not used. Since then, an ETIMEDOUT error has occurred once in a while, but the reconnection logic kicked in, and I haven't seen any 5xx errors since then. i.e.
|
🎉 This issue has been resolved in version 7.67.7 🎉 The release is available on:
Your semantic-release bot 📦🚀 |
Is your feature request related to a problem? Please describe.
There is no way to override 'reconnectOnError' since the internal 'reconnectOnError' always overwrites the one in 'redisOptions'.
tsed/packages/orm/ioredis/src/utils/registerConnectionProvider.ts
Line 67 in 3269a12
Describe the solution you'd like
I've been experiencing issues with ioredis in our AWS Lambda-based ts.ed distribution, specifically receiving 'connection is closed' errors from time to time. Many comments including this suggest using 'reconnectOnError', but the ts.ed ioredis distribution hard codes this function.
Describe alternatives you've considered
Perhaps we could change the order to something like the following?
Additional context
No response
Acceptance criteria
No response
The text was updated successfully, but these errors were encountered: