r2dbc / r2dbc-pool

Connection Pooling for Reactive Relational Database Connectivity
https://r2dbc.io
Apache License 2.0
331 stars 55 forks source link

Failed to obtain R2DBC Connection; nested exception is io.r2dbc.spi.R2dbcNonTransientResourceException: Connection is close. Cannot send anything #172

Closed park-taejoon closed 2 years ago

park-taejoon commented 2 years ago

Hello.

ConnectionPoolConfiguration poolConfiguration
                = ConnectionPoolConfiguration.builder(ret)
                                            .name("LogDb-Pool")
                                            .initialSize(8)
                                            .maxSize(8)
                                            .acquireRetry(3)
                                            .maxAcquireTime(Duration.ofSeconds(1L))
                                            .maxCreateConnectionTime(Duration.ofSeconds(3L))
                                            .maxLifeTime(Duration.ofSeconds(580L))
                                            .validationQuery("SELECT 1")
                                            .maxIdleTime(Duration.ofSeconds(58L))
                                            .backgroundEvictionInterval(Duration.ofMinutes(1))
                                            .build();

I keep getting an error.

mp911de commented 2 years ago

If you would like us to spend some time helping you to diagnose the problem, please spend some time describing it and, ideally, providing a minimal sample that reproduces the problem.

park-taejoon commented 2 years ago

Sorry. Couldn't provide a minimal sample.

jdk : 15 spring boot : 2.6.4 db : mariadb spring-boot-starter-data-r2dbc, r2dbc-mariadb(1.0.3)

From my observation, the error occurs intermittently every 10 minutes. This seems to have something to do with the maxlife setting. I'm currently trying to debug more by changing the properties.

mariadb wait-time is 600 seconds

mp911de commented 2 years ago

Closing this ticket as it is not actionable for us without a way to reproduce the problem.