Skip to content
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

Pub-Sub Race conditions on high load - Subscription has been unsubscribed and cannot be used anymore #2425

Open
IZWO opened this issue Oct 5, 2022 · 4 comments
Assignees
Labels
status: waiting-for-triage An issue we've not yet triaged

Comments

@IZWO
Copy link

IZWO commented Oct 5, 2022

After having a high load, the redis connections get closed automatically and error "Subscription has been unsubscribed and cannot be used anymore" is thrown.
We use the pub/sub event.
Bypass: if we uncomment the line

redisMessageListenerContainer.addMessageListener(listenerAdapter, new PatternTopic("Dummy"));

then it keeps working.
We have 3 Redis Machines in a cluster. See the attached example code and some logging in the target folder.

@IZWO
Copy link
Author

IZWO commented Oct 5, 2022

Bugfix.zip

@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged label Oct 5, 2022
@mp911de mp911de self-assigned this Oct 10, 2022
@captrespect
Copy link

captrespect commented Dec 22, 2022

any way to mitigate this issue or work around it? I'm not sure how to recover from it other than restarting our spring server.

@IZWO
Copy link
Author

IZWO commented Dec 26, 2022

any way to mitigate this issue or work around it? I'm not sure how to recover from it other than restarting our spring server.
Yes, with uncommenting the dummy as stated above

@caiuswang
Copy link

This maybe a concurrency scenario bug that you can use by adding a persistent subscription (not unsbscribe). For example, when the application starts, a nothing_channel subscription is added. You can see if this works to you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: waiting-for-triage An issue we've not yet triaged
Projects
None yet
Development

No branches or pull requests

5 participants