Spring Webflux performance issues in 1.57
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
This issue has not been assessed yet.
Description
Describe the bug
The new co.elastic.apm.agent.reactor.SubscriptionCancelInstrumentation has significant impact on performance in Spring Webflux project, especially when using alongside something that runs with low latency like Redis causing exceptions like this:
Unable to acquire connection! java.util.concurrent.CompletableFuture@18e0306a[Completed exceptionally: java.util.concurrent.CancellationException]Increase connection pool size. Node source: NodeSource [slot=0, addr=null, redisClient=null, redirect=null, entry=null], command: (EXPIRE), params: [[115, 112, 114, 105, 110, 103, 58, 115, 101, 115, ...], 1209900] after 1 of 2 retry attempts
at org.redisson.command.RedisExecutor.lambda$scheduleRetryTimeout$0(RedisExecutor.java:309)
at io.netty.util.HashedWheelTimer$HashedWheelTimeout.run(HashedWheelTimer.java:717)
at io.netty.util.concurrent.ImmediateExecutor.execute(ImmediateExecutor.java:34)
at io.netty.util.HashedWheelTimer$HashedWheelTimeout.expire(HashedWheelTimer.java:705)
at io.netty.util.HashedWheelTimer$HashedWheelBucket.expireTimeouts(HashedWheelTimer.java:791)
at io.netty.util.HashedWheelTimer$Worker.run(HashedWheelTimer.java:501)
at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30)
at java.lang.Thread.run(Thread.java:1474)
I tested the throughput of the "non-instrumentation" solution that we discussed here and I saw ~10x improvement in throughput or latency of http calls of the service
Steps to reproduce
Steps to reproduce the behavior:
- Create Spring Boot 4 Webflux project with some simple API and use cache using Redis in it
- Compare throughput of the service http calls with and without APM client version 1.57
Expected behavior
Throughput should be very similar ( not 10x diff )
- Dominant language
- Java
- Stars
- 593
- Forks
- 337
- Avg merge
- 15h 24m
- Merged PRs (30d)
- 15
Getting set up
- Ships a Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from elastic/apm-agent-java
-
agent-java
Difficulty 2/5 1-2 days Newbie friendliness 62/100
elastic/apm-agent-java#2844 · 2 comments ·
Maintainers usually reply within 1 day
-
Improve docs and add error log related to illegal activation of transactionPossibly taken @AzazelSensei claimed this 28 days ago. Opendocs good first issue
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
elastic/apm-agent-java#850 · 4 comments · 1 reaction ·
Maintainers usually reply within 1 day
-
agent-java
Difficulty 4/5 3-5 days Newbie friendliness 55/100
elastic/apm-agent-java#4549 ·
Maintainers usually reply within 1 day
-
UnsupportedOperationException at startup when using JDK 26+Possibly taken A pull request linked to this issue is open or already merged. Openagent-java bug
Difficulty 4/5 3-5 days Newbie friendliness 48/100
elastic/apm-agent-java#4519 · 1 comment ·
Maintainers usually reply within 1 day
-
agent-java community enhancement
Difficulty 4/5 3-5 days Newbie friendliness 45/100
elastic/apm-agent-java#4506 · 1 comment · 1 reaction ·
Maintainers usually reply within 1 day
All issues in elastic/apm-agent-java
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
openhab/openhab-addons#21882 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
YunaiV/ruoyi-vue-pro#1273 ·
Maintainers usually reply within 3 days
-
Difficulty 1/5 Under an hour Newbie friendliness 85/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
objectionary/eo#9253 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
objectionary/hone-maven-plugin#1298 ·
Maintainers usually reply within 1 day