We are running delay test using Chaos Monkey on our service. We introduce 2 second delay using it.
During this time the response time of our service goes down to 35-40 seconds also.
When we profiled our application, we found that the maximum amount is being spent on getting connection from connection pool. We use tomcat-jdbc
for connection pooling.
Ideally the 2 second delay should have cause <5 second deterioration in our response time.
We checked the logs of tomcat-jdbc
and found waitCount
increasing.
We increased the InitialSize
and MaxActive
connections in connection pool. It helped a little but nothing changed significantly.
What can be possibly going wrong here?