Damans227 opened a new pull request, #14965:
URL: https://github.com/apache/cloudstack/pull/14965

   There is no way to see which code holds a database connection and never 
gives it back. The pool just runs out and the error doesnt say who caused it. 
This adds a leakDetectionThreshold setting for the cloud, usage and simulator 
pools in db.properties. When a connection stays out longer than that, the pool 
logs a warning with the stack trace of the code that took it. It is off by 
default (0). The leak warning gets its own log line in log4j-cloud.xml.in so it 
still prints if the pool logs are muted. This picks up from #13407, which was 
closed because the leak logs needed tuning.
   
   ### Test:
   
   Set db.cloud.leakDetectionThreshold=2000 in db.properties, restart the 
management server and hold a connection longer than 2 seconds.
   
   **Before:** no warning, the pool only fails once it runs out.
   
   **After:** a warning from ProxyLeakTask with the stack trace in 
management-server.log. Lab results to follow.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to