-1

When external user call create method sometimes client getting Failed to obtain R2DBC Connection error. Cauase: io.netty.channel.unix.Errors$NativeIoException: recvAddress(..) failed: Connection reset by peer My pool configuration:

  url: r2dbc:postgresql://PG_HOST:5432/credit-db
  username: PG_USER
  password: PG_PASSWORD
  pool:
    provider: fixed
    initial-size: 3
    min-idle: 3
    max-life-time: 600000
    max-size: 15
    connection-timeout: 30000
    pending-acquire-timeout: 60000
    evict-in-background: 120000
    idle-timeout: 20000
    acquire-retry: 3
    validation-query: SELECT 1
    register-mbeans: true
    validation:
      enabled: true
      validate-seconds: 60````

How to solve this problem

My dependency: 
<dependency>
          <groupId>org.springframework.boot</groupId>
          <artifactId>spring-boot-starter-data-r2dbc</artifactId>
      </dependency>

1 Answers1

0

The server firewall may limit the empty connection time.

r2dbc:
...
  pool:
    ....
    max-idle-time: 5m`
DeadChex
  • 4,379
  • 1
  • 27
  • 34