ratelimitj icon indicating copy to clipboard operation
ratelimitj copied to clipboard

Hard redis Dependency

Open sekhrivijay opened this issue 4 years ago • 0 comments

If redis is down the whole reactive app stops working . This is due to the fact that there is no timeout setup

image

To fix the issue

public static final ExecutorService CANCEL_EXECUTOR = Executors.newCachedThreadPool(); .cancelOn(Schedulers.fromExecutor(RedisCacheApiConfiguration.CANCEL_EXECUTOR)) .timeout(Duration.ofMillis(config.getReadTimeout())) Notice we will need a different scheduler for cancel because redis has a bug where on cancel it blocks the core thread.

sekhrivijay avatar Feb 28 '20 20:02 sekhrivijay