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

Infinitive loop on reconnect (disconnect errors) #42

Open
ragnor opened this issue Dec 16, 2010 · 3 comments
Open

Infinitive loop on reconnect (disconnect errors) #42

ragnor opened this issue Dec 16, 2010 · 3 comments

Comments

@ragnor
Copy link

ragnor commented Dec 16, 2010

Sometime it happens that jredis falls into infinitive loop of throwing errors on disconnect method:

JREDIS: while attempting reconnect: Factual error in method ConnectionBase.disconnect() [file: ConnectionBase.java line:384 - package: org.jredis.ri.alphazero.connection]

Only way to stop this and release CPU resources (it consumes a lot of CPU time) is to restart server. Also when there are some problems with connection sometimes connection isn't used any more but there are many HeartbeatJinn threads.

Quick solution can be to use
if (isConnected()) { // body of the disconnect method }
instead of
Assert.isTrue (isConnected(), IllegalStateException.class);

@alphazero
Copy link
Owner

That's a bug. What version of JRedis?

@ragnor
Copy link
Author

ragnor commented Jan 11, 2011

It's occurred on JRedis 1.0-rc2. The same code is in current master: 2.0.0 Compatible.

BTW. Any plans for new official jredis release compatible with redis 2.x?

@alphazero
Copy link
Owner

I'm buried with work at work :) I certainly do want to.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants