Relative Content

Tag Archive for javaredisjedis

Jedis pub / sub breaks after channel hasn’t been talked in for a significant time

I am making a Minecraft spigot plugin in java using redis to broadcast custom messages accross multiple different servers connected to the same redis instance. I am using the https://github.com/InvisRaidinq/redstone library in order to make handling and coding the jedis functions simpler. This works however if no messages are sent over the channel for a significant time all of the jedis subscription / onRecieve logic just stops working and does nothing. I am still able to publish messages to the channel and they do get sent to the redis instance but all of the subscription logic just does nothing.

use jedis for redis,lpush method was waiting for long time

First of all thank you very much
The program is written in java
I used 10 threads to execute the jedis.lpush method in while, and for 2 days all threads were runable and blocked on jedis.lpush.
It seems that none of the timeout methods set by jedis are effective. I hope you can get help, thank you very much
Here’s some of the information I printed in jstack: