java.sql.SQLException: An attempt by a client to checkout a Connection has timed out

解决方案 »

  1.   

    我配置了这项
    <property name="checkoutTimeout">20000</property>
    有人说取消这项, 我看也是治标不治本
      

  2.   

    Caused by: org.springframework.transaction.CannotCreateTransactionException: Could not open Hibernate Session for transac
    tion; nested exception is org.hibernate.exception.GenericJDBCException: Cannot open connection
    数据库连接无法打开,检查你的hibernate配置的数据库连接URL,如果你的DB客户端工具都连不上后台数据库实例,怎么指望Hibernate连得上去呢?
      

  3.   

    在cmd下用netstat -a 看一下你的那些链接是否关闭了,如果有很多打开的连接说明你的代码没有关闭连接。
      

  4.   

    在cmd下用netstat -a 看一下你的那些链接是否关闭了,如果有很多打开的连接说明你的代码没有关闭连接。
      

  5.   


    慎用this.getSession()来获取session