I have a web application hosted on tomcat 8.0. Application uses ADFS for single signon. Over the past few weeks we are experiencing a weird issue. After we deploy a fresh war or restart the application, there are no issues and application runs fine for 3 days. On the third day/fourth day (approx), application is not able to respond to any request and needs a restart. On analysing, I found that web application sends a request to Spring rest controller. Rest controller receives the request and then gets the credentials from SAML. With loggers, I found that we get the credentials from SAML properly however, the request does not proceed further in the same method and gets stuck. Tomcat logs does not show any memory issues or out of memory errors. Ultimately we have to restart the application to get things working. After restart, every thing works fine for 3 more days. Running out of ideas.
java.lang.Thread.State: WAITING (on object monitor) at java.lang.Object.wait(Native Method) at java.lang.Object.wait(Object.java:502) at org.apache.commons.pool.impl.GenericObjectPool.borrowObject(GenericObjectPool.java:1104) - locked <0x000000071d714410> (a org.apache.commons.pool.impl.GenericObjectPool$Latch) at org.apache.commons.dbcp.PoolingDataSource.getConnection(PoolingDataSource.java:106) at org.apache.commons.dbcp.BasicDataSource.getConnection(BasicDataSource.java:1044) at org.hibernate.engine.jdbc.connections.internal.DatasourceConnectionProviderImpl.getConnection