zoukankan      html  css  js  c++  java
  • Software caused connection abort: socket write error


    57151609 [http-80-21] WARN org.hibernate.util.JDBCExceptionReporter - SQL Error: 0, SQLState: 08S01

    57151609 [http-80-21] ERROR org.hibernate.util.JDBCExceptionReporter - Communications link failure due to underlying exception:

    ** BEGIN NESTED EXCEPTION **

    java.net.SocketException

    MESSAGE: Software caused connection abort: socket write error

    STACKTRACE:

    java.net.SocketException: Software caused connection abort: socket write error


    Mysql connection timeout is 8 hours,or connection will close.


    We can use c3p0 to resolve this error.


    Modify the hibernate.cfg.xml like this:


    <property name="hibernate.connection.provider_class">org.hibernate.connection.C3P0ConnectionProvider</property>& amp;amp; lt;br /> <property name="hibernate.c3p0.min_size">8</property>
    <property name="hibernate.c3p0.max_size">200</property>
    <property name="hibernate.c3p0.timeout">600</property>
    <property name="hibernate.c3p0.max_statements">0</property>
    <property name="hibernate.c3p0.idle_test_period">60</property>
    <property name="hibernate.c3p0.acquire_increment">2</property>
    <property name="hibernate.c3p0.validate">true</property>


    You should also add

    hibernate3.jar

    c3p0-0.9.1.jar





  • 相关阅读:
    2020春Contest
    HDU Count the string (KMP)
    P1757 通天之分组背包
    L1-050 倒数第N个字符串
    3月份目标
    Division UVa725
    数三角
    luogu P2051 [AHOI2009]中国象棋 dp 状态压缩+容斥
    Codeforces Round #654 (Div. 2) E
    Codeforces Round #654 (Div. 2) D
  • 原文地址:https://www.cnblogs.com/liuzhengdao/p/1579852.html
Copyright © 2011-2022 走看看