restart tomcat if lost 10 times continuously.