Closed threeMonthee closed 1 week ago
my pom:
<dependency>
<groupId>com.siyuchat.im</groupId>
<artifactId>message-api</artifactId>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>com.websiyu.im.sdk</groupId>
<artifactId>im-sdk-user-api</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-bootstrap</artifactId>
</dependency>
<dependency>
<groupId>com.alibaba.cloud</groupId>
<artifactId>spring-cloud-starter-alibaba-nacos-discovery</artifactId>
</dependency>
<dependency>
<groupId>com.alibaba.cloud</groupId>
<artifactId>spring-cloud-starter-alibaba-nacos-config</artifactId>
</dependency>
<dependency>
<groupId>com.siyuchat.im</groupId>
<artifactId>sy-connect-user-starter</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-webflux</artifactId>
<version>3.3.1</version>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-actuator</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-data-r2dbc</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-data-redis-reactive</artifactId>
</dependency>
<dependency>
<groupId>org.redisson</groupId>
<artifactId>redisson-spring-boot-starter</artifactId>
<exclusions>
<exclusion>
<groupId>org.redisson</groupId>
<artifactId>redisson-spring-data-32</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.redisson</groupId>
<artifactId>redisson-spring-data-30</artifactId>
</dependency>
<dependency>
<groupId>io.asyncer</groupId>
<artifactId>r2dbc-mysql</artifactId>
<version>1.1.3</version>
</dependency>
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-lang3</artifactId>
</dependency>
<dependency>
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
</dependency>
<dependency>
<groupId>com.github.ben-manes.caffeine</groupId>
<artifactId>caffeine</artifactId>
</dependency>
<dependency>
<groupId>io.opentelemetry</groupId>
<artifactId>opentelemetry-api</artifactId>
<version>${version.opentelemetry}</version>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>io.micrometer</groupId>
<artifactId>micrometer-registry-prometheus</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-validation</artifactId>
</dependency>
</dependencies>
Hi, @threeMonthee. It looks like an issue in R2DBC pool. which version of r2dbc-pool are you using? seems latest r2dbc-pool would fix the issue.
Hi, @threeMonthee. It looks like an issue in R2DBC pool. which version of r2dbc-pool are you using? seems latest r2dbc-pool would fix the issue.
I use spring-webflux:3.0.2 and r2dbc-pool is 1.0.0.RELEASE.
Hi, @threeMonthee. It looks like an issue in R2DBC pool. which version of r2dbc-pool are you using? seems latest r2dbc-pool would fix the issue.
- ref: reactor-tcp-nio-3 thread cpu 100% reactor/reactor-netty#2865 That seems to be the question, thanks
I use spring-webflux:3.0.2 and r2dbc-pool is 1.0.0.RELEASE.
Could you upgrade to version 1.0.2 to see if the issue still occurs?
I used springwebflux + r2dbc-mysql to build the web project. In my tests, I found that most database operations were always performed in the same thread, resulting in 80% cpu load on that thread. I checked the driver and reactor-netty-core source code and found nothing wrong. The eventloopGroup in reactor-netty in the driver is multithreaded, but it turns out that with spring connection pooling, all connected channels are bound to an eventloop.