84669 person learning
152542 person learning
20005 person learning
5487 person learning
7821 person learning
359900 person learning
3350 person learning
180660 person learning
48569 person learning
18603 person learning
40936 person learning
1549 person learning
1183 person learning
32909 person learning
业精于勤,荒于嬉;行成于思,毁于随。
What method do you use to connect data? JDBC direct connection, DBCP, C3P0?
I also encountered this problem before (the latter two methods), because I don’t use C3P0 now. Here are my DBCP settings:
maxIdle="20" maxWait="120000" testOnBorrow="true" validationQuery="SELECT 1"
After setting these 4 parameters, my server is scheduled to restart every morning when no one is around. The key are testOnBorrow and validationQuery.
Try increasing the connection pool of tomcat
Probably the volume of requests is too large, tomcat can’t handle it, and nginx (if there is one in front of tomcat) has lost some requests.
What method do you use to connect data? JDBC direct connection, DBCP, C3P0?
I also encountered this problem before (the latter two methods), because I don’t use C3P0 now. Here are my DBCP settings:
After setting these 4 parameters, my server is scheduled to restart every morning when no one is around. The key are testOnBorrow and validationQuery.
Try increasing the connection pool of tomcat
Probably the volume of requests is too large, tomcat can’t handle it, and nginx (if there is one in front of tomcat) has lost some requests.