I am using ThreadSafeClientConnManager for multithreading in a java application. My ThreadSafeClientConnManager object is static, so it remains until application is running.
What will happen if I am never calling closeExpiredConnections() or closeIdleConnections()?
Will it crash my application in the long run?
The following assumes you use httpcmponents-client 4.1.2 which is the current GA.
Judging from the code and javadocs nothing bad will happen. ThreadSafeClientConnManager has reasonable limits. If you did not change the limits upwards, eventually the pool will fill and the old connections will be kicked out.
One down side would be that you are holding on to idle and expired connection that hold resources (file handles) and objects that are not needed. But again, if you did not change the defaults, the amount of these resources is small compared to what is available: 20 file handles from a total of 1000 available on a linux system.
In short: this will not crash the app.
PS these libraries have the source available, you should see for yourself what are the consequences.