spring-boot web app loses ability to connect to MySQL / RDS after a while

后端 未结 2 1972
时光说笑
时光说笑 2021-01-06 14:21

I have a normal spring boot 1.2.x web app with an embedded Tomcat 7.x container and connected to an RDS instance (running MySQL 5.6). If the application is idle for a period

2条回答
  •  南方客
    南方客 (楼主)
    2021-01-06 14:59

    Try using this as well

    spring.datasource.test-while-idle=true
    spring.datasource.validation-interval=5000
    

提交回复
热议问题