-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
redis-cache blocks the eventloop #36382
Comments
/cc @cescoffier (redis), @gsmet (redis), @gwenneg (cache), @machi1990 (redis) |
Without an example application that exhibits this problem, it will be very hard to track down the problem |
I will add an example application a bit later |
Sample application: https://github.com/bartm-dvb/quarkus-redis-bug It seems to happen only when the Redis client is configured in cluster mode. Running a load test on this will cause it to run out of open files. I will run tests tomorrow with more open files allow to see if I will run in to thread-blocked warnings |
\CC @Ladicek |
I'm fairly sure this is caused by vert-x3/vertx-redis-client#365 (connection pooling basically doesn't work at all), which indeed only manifests when using clustered Redis client. This should be fixed in the next Vert.x release, which should be this week. Once that is integrated in Quarkus, we can see whether there's more to this issue. |
Thanks, I see the new Vert.x version was released yesterday. I will rerun the test when the new Quarkus version is released so we can close this issue |
- Fixes Redis connection pooling for quarkusio#36382
- Fixes Redis connection pooling for quarkusio#36382
Vert.x 4.4.6 seems to fix the issue, at least improve a lot. |
That's good news! Thanks for taking the effort to run the test. |
Describe the bug
The Redis cache implementation seems to block the eventloop. It causes the HTTP throughput to be very poor, we see that the
worker_pool_queue_delay_seconds_max
metric keeps getting higher and higher, it was at 60s before we turned off the load test. It also seems to cause a very high number of open files on the Linux system.We verified this by switching to caffeine cache, the throughput increased by a factor 3. The number of open files dropped and
worker_pool_queue_delay_seconds_max
stays low.Expected behavior
The Redis cache implementation does not block the eventloop.
Actual behavior
The Redis cache implementation blocks the eventloop.
How to Reproduce?
@CacheResult
thread blocked
errorsOutput of
uname -a
orver
Linux 4.18.0-477.27.1.el8_8.x86_64
Output of
java -version
openjdk version "17.0.5" 2022-10-18 LTS OpenJDK Runtime Environment (Red_Hat-17.0.5.0.8-2.el8_6) (build 17.0.5+8-LTS) OpenJDK 64-Bit Server VM (Red_Hat-17.0.5.0.8-2.el8_6) (build 17.0.5+8-LTS, mixed mode, sharing)
GraalVM version (if different from Java)
No response
Quarkus version or git rev
3.4.1
Build tool (ie. output of
mvnw --version
orgradlew --version
)3.9.2
Additional information
No response
The text was updated successfully, but these errors were encountered: