Spring JDBC DBCP to get rid of noroute, last packet was sent 1ms ago exceptions

When using Spring JDBC for connection, it creates one connection for each call and it will end up with running out listening ports since it will take 60 seconds to release the connection (until then, it is TIME_WAIT: it can be checked using command: (netstat -nat | grep TIME_WAIT | wc -l) ).

To get rid of it, I found that using DCBP BasicDataSource instead of spring datasource with pooling.


Download : DCBP jar from https://commons.apache.org/



      

       

      

      

      


No comments:

Post a Comment