Skip to content
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

ReactiveRedisConnection close is blocking [DATAREDIS-1095] #1665

spring-projects-issues opened this issue Feb 5, 2020 · 2 comments


Copy link

@spring-projects-issues spring-projects-issues commented Feb 5, 2020

lovelywxd opened DATAREDIS-1095 and commented

I got the following in my logs

 Operator called default onErrorDropped

java.lang.IllegalStateException: block()/blockFirst()/blockLast() are blocking, which is not supported in thread reactor-http-epoll-3
	at reactor.core.publisher.BlockingSingleSubscriber.blockingGet(
	at reactor.core.publisher.Mono.block(
	at reactor.core.publisher.FluxDoFinally$DoFinallySubscriber.runFinally(
	at reactor.core.publisher.FluxDoFinally$DoFinallySubscriber.cancel(
	at reactor.core.publisher.Operators$MultiSubscriptionSubscriber.drainLoop(
	at reactor.core.publisher.Operators$MultiSubscriptionSubscriber.drain(
	at reactor.core.publisher.Operators$MultiSubscriptionSubscriber.cancel(
	at reactor.core.publisher.MonoReduceSeed$ReduceSeedSubscriber.cancel(
	at reactor.core.publisher.FluxMapFuseable$MapFuseableSubscriber.cancel(
	at reactor.core.publisher.Operators.terminate(

my spring-boot verison is 2.2.1, spring-data-redis version is 2.2.1
I see this same question ( it said this question has solved in version 2.2.0. it  happend in my project again. 
so I don't know how to fix this question.
my code is below:

Flux<List<Long>> flux = this.redisTemplate.execute(this.script, keys, scriptArgs);

I see this exception is still throwed in 

@Override default void close() { closeLater().block(); }

I don't know why it should call block() if connection close async. 

Affects: 2.2.4 (Moore SR4)

Issue Links:

  • DATAREDIS-1077 ReactiveRedisTemplate calling the blocking close() from DefaultReactiveScriptExecutor
  • DATAREDIS-1116 ReactiveRedisConnection close method is blocking
    ("is duplicated by")

Referenced from: pull request #509

Backported to: 2.2.5 (Moore SR5), 2.1.16 (Lovelace SR16)

Copy link

@spring-projects-issues spring-projects-issues commented Feb 5, 2020

Mark Paluch commented

This issue is slightly different. While we fixed the blocking call in ReactiveRedisTemplate this issue is about DefaultReactiveScriptExecutor. Someone asked in DATAREDIS-999 also for the script executor but since it was a closed ticket the comment got lost and no one followed up. We need to fix the script executor call

Copy link

@spring-projects-issues spring-projects-issues commented Feb 5, 2020

lovelywxd commented

Thanks for the update。Yes, As you said, �I find that it is ReactiveRedisTemplate in DATAREDIS-999, but this issue is about DefaultReactiveScriptExecutor.
then I still have some questions below:

  1. What's the impact of this exception? This exception seem to be happened when connection close. I don't know whether the connection resources will be released or not.
  2. how can I fix this error, or how to use correctly reactiveRedisTemplate. Actually, my spring-boot version is 2.1.5 (spring-data-redis version 2.1.8) when I come across the excecption. I try to upgrde version to fix this error, but it is not easy for my project in fact. So I want to konw how to use correctly if I want to use reactive-redis in spring-data-redis version 2.1.8
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants