Development/Servers

Tomcat autoReconnect

석찬 2013. 12. 24. 11:59
반응형

개발 테스트(반은 운영)서버라 이런 저런 메시지 무시 하면서 지내고 있다가

추가로 기능 넣을게 있어서 확인차 url하나 던져봤더니


com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: The last packet successfully received from the server was 63,648,495 milliseconds ago.  The last packet sent successfully to the server was 63,648,495 milliseconds ago. is longer than the server configured value of 'wait_timeout'. You should consider either expiring and/or testing connection validity before use in your application, increasing the server configured values for client timeouts, or using the Connector/J connection property 'autoReconnect=true' to avoid this problem.

        at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)

        at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)

        at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)

        at java.lang.reflect.Constructor.newInstance(Constructor.java:526)

이하 생략


결과는 나오는데 위와같이 에러 메시지가...

내용보니 mysql과 연결이 끊어졌는데 어쩌고저쩌고 

앞으로 이걸 보고싶지 않으면 autoReconnect라는걸 설정해라 뭐 이런내용이더라


해서 약간 검색을해서 다음과 같이 적용을 시켜 주었다.

<Resource name="jdbc/ROK" auth="Container" type="javax.sql.DataSource"

               maxActive="100" maxIdle="30" maxWait="10000"

               username="" password="" driverClassName="com.mysql.jdbc.Driver"

               url="jdbc:mysql://127.0.0.1:3306/ROK?autoReconnect=true"/>


반응형

'Development > Servers' 카테고리의 다른 글

Android, Tomcat REST  (0) 2014.02.20
SVN을 사용하기 위해 발버둥 치면서...  (0) 2014.01.08
MariaDB  (0) 2013.12.12
우분투 서버에서 SVN  (0) 2013.05.28
우분투 설정중 Oracle Java 설치하기  (0) 2013.05.02