Our Sonar instance is coupled with a MySQL DB. When JUnit tests take too much time (in our case more than 6 minutes) the MySQL connection seems to be closed. then Sonar analysis fails with:
Maybe we could solve the problem by removing the timeout (we are investigating). But I feel Sonar could be improved by not keeping an open connection during long operations like JUnit/cobertura/cpd.
This issue is in favor of a 2 stage analysis (see SONAR-2119).