java - 一段时间不访问错误500,刷新一下就好了。
阿神
阿神 2017-04-18 10:02:37
0
3
579
阿神
阿神

闭关修行中......

reply all (3)
左手右手慢动作

In addition to the settings above, you can set how many seconds to go to the database to select 1 to keep this link alive

    Ty80

    This is because the waiting time for the connection configured in your connection pool is too long,mysqlThe connection has been considered expired.
    The solution is as follows

    1. Modify my.cnf to extend the connection timeout
    [mysqld]
    wait_timeout=31536000
    interactive_timeout=31536000

    2. Add parameters to the connection URL
    autoReconnect=true&failOverReadOnly=false

      小葫芦
      spring.datasource.adanos.initialSize=1 spring.datasource.adanos.minIdle=1 spring.datasource.adanos.maxActive=30 spring.datasource.adanos.maxWait=60000 spring.datasource.adanos.timeBetweenEvictionRunsMillis=60000 spring.datasource.adanos.minEvictableIdleTimeMillis=300000 spring.datasource.adanos.validationQuery=select x spring.datasource.adanos.testWhileIdle=true spring.datasource.adanos.testOnBorrow=false spring.datasource.adanos.testOnReturn=false spring.datasource.adanos.poolPreparedStatements=true spring.datasource.adanos.maxPoolPreparedStatementPerConnectionSize=10 spring.datasource.adanos.filters=stat
        Latest Downloads
        More>
        Web Effects
        Website Source Code
        Website Materials
        Front End Template
        About us Disclaimer Sitemap
        php.cn:Public welfare online PHP training,Help PHP learners grow quickly!