Spring RedisTemplate: after 8 calls method keys hangs up
<p>I use Spring RedisTemplate (spring-data-redis 1.7.1) for communication with Redis. I need to get and then delete keys by regexp (ex: "context:user1:*"). I use method <em>"RedisTemplate.keys(...)"</em> for getting array of keys</p>

<pre><code>{
    String key = String.format("%s:%s:%s", context, userId,"*");
    Set&lt;byte[]&gt; keys = redisTemplate.getConnectionFactory().getConnection().keys(key.getBytes());
    logger.debug(String.format("test log"));
}
</code></pre>

<p>But on 8-9 iteration call restTemplates.keys(...) stops execution of the my java service. The call of method is not returned from framework. My service is hangs up. Also it is happening everytime. Workaround is only restart my service. </p>