-
Notifications
You must be signed in to change notification settings - Fork 3.9k
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
Large number of exists() queries causes ArrayIndexOutOfBoundsException #590
Comments
Hello! |
I have been trying to reproduce this issue more recently, but I can't. From looking at the Jedis code (latest git), and the stack trace, it appears that this would happen at RedisOutputStream.java:37 where "count" is bigger than the buffer size (buf.length). But I can't reproduce the conditions that led to count being bigger than buf.length :( |
@U-238 There're so many issues about this. Please make sure that you call pool.returnBrokenResource or destroy instance when Jedis instance is broken. Similar issue : #552 If we have IO exception with Jedis instance, internal inputstream and outputstream cannot work well. Maybe this issue is kind of that problems. If your issue isn't resolved after applying this, please comment with full source codes with your Redis / Jedis version. |
having a same problem here with redis 2.6.4 and jedis 2.4.2 |
If I have a redis connection open for a long time and often call exists(), the RedisOutputStream will eventually exceed the buffer size, because it is never flush()ed. Notice how the array index increases with each error message. A possible fix is to flush() the redis output buffer every time exists() is called.
The text was updated successfully, but these errors were encountered: