redis.clients.jedis.exceptions.JedisDataException: ERR only (P)SUBSCRIBE / (P)UNSUBSCRIBE / PING / QUIT allowed in this context

Searched on Google with the first line of a JAVA stack trace?

We can recommend more relevant solutions and speed up debugging when you paste your entire stack trace with the exception message. Try a sample exception.

Recommended solutions based on your search

Samebug tips

,
Expert tip

Redis has some limitations of various bulk length, the length of args of the API command MSET can't be bigger than 1024*1024, set a limiter on how big your list is to avoid this.

,
Expert tip

You're experiencing issue #124 in spring session: https://goo.gl/CgfzZ2. You can use the workaround described here: https://goo.gl/pnn7Cc or check the bug page mentioned for disscussion about it!

Solutions on the web

via Stack Overflow by manish
, 1 year ago
ERR only (P)SUBSCRIBE / (P)UNSUBSCRIBE / PING / QUIT allowed in this context
via Google Groups by Moxie, 7 months ago
ERR unknown command '*2 $11 UN'
via GitHub by ahzean
, 2 years ago
ERR max number of clients reached
via GitHub by ahzean
, 2 years ago
ERR max number of clients reached
redis.clients.jedis.exceptions.JedisDataException: ERR only (P)SUBSCRIBE / (P)UNSUBSCRIBE / PING / QUIT allowed in this context
at redis.clients.jedis.Protocol.processError(Protocol.java:117)
at redis.clients.jedis.Protocol.process(Protocol.java:151)
at redis.clients.jedis.Protocol.read(Protocol.java:205)
at redis.clients.jedis.Connection.readProtocolWithCheckingBroken(Connection.java:297)
at redis.clients.jedis.Connection.getRawObjectMultiBulkReply(Connection.java:242)
at redis.clients.jedis.Connection.getObjectMultiBulkReply(Connection.java:248)
at com.app.redis.RedisNewPostListener.onMessage(RedisNewPostListener.java:39)
at redis.clients.jedis.JedisPubSub.process(JedisPubSub.java:129)
at redis.clients.jedis.JedisPubSub.proceed(JedisPubSub.java:102)

Users with the same issue

2 times, 1 week ago
20 times, 3 months ago
Once, 3 months ago
5 times, 4 months ago
3676 times, 1 year ago

Write tip

Know the solutions? Share your knowledge to help other developers to debug faster.