This might be a repeated question but still I didn't find a proper solution for it. Hence posting.
Problem 1: I have a java application deployed on tomcat and it has REST based services, which fetches the data from mySQL database and returns it back to the client. The calls to the service returns "Internal server error with status 500" and the very next moment, it executes fine. What might be the problem in this case?
Problem 2: The tomcat stops working and until I reload the deployed application, it doesn't work. What can be a solution for this? Can a watch dog be developed to ping the application for its availability and restart if it is not available?