-
Notifications
You must be signed in to change notification settings - Fork 136
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
java.util.concurrent.ExecutionException: Provider ExceptionBug? Expecting status code for size/count #44
Comments
Please let me know if I can provide any further information which will help me understand why I'm seeing this problem. Currently, I'm having to restart each app server multiple times a day. |
Hi Jabley, First thought was that the client and server were mismatched. But looks like a concurrent use of the connection. In general, unless you have client/server version mismatch, that sort of un-expected token in the response is generally due to 2 or more thread using a non-threadsafe connector.
|
Just to be explicit: the JRedisAsyncClient reference is being used as a shared resource across all request threads in my webapp, with no external mutex acting as a barrier. Is that a safe way of using it? I'm going to switch this to using a pipeline connection instead and see what happens, as you suggest. |
So my understanding of your suggestion is to change the JRedisFuture implementation that I am using; i.e. from I haven't found any documentation showing how to use this class (wiki / Javadoc). Are you familiar with the JSR-305 or JCIP annotations regarding thread-safety? I've found them useful from a documentation perspective at least. I'll make the above change to my code and try to test. Unfortunately, I'm not able to reliably reproduce the problem, so I'll just have to see if the current situation improves at all. Cheers, James |
Its not thread safe. Semantics are defined: JRedsAsynch interface. Its identical to any implementation of JRedisAsynch. Its trivial to reproduce the problem: the heartbeat is sending PING and expecing +Pong. That's a status response. Just simply do a tight loop with INCR (expecting a number response) and you'll get your exception. |
Environment:
RHEL5
Sun Java "1.6.0_20"
Redis 1.2.6
JRedis 1.0RC2
I intermittently see this problem in my application logs. Once this starts to happen, I usually have to restart the app server.
Telnetting to the redis server shows that I can get the value of the key just fine.
Java client code:
The text was updated successfully, but these errors were encountered: