We have a RESTful web service (Java, hosted in Tomcat on Ubuntu on Amazon EC2). From time to time it fails (not every week). When it fails, Java CPU consumption goes to 100% and it takes all available memory. It does not finish by itself. I have to restart the server.

There is nothing suspicious in Tomcat access logs. I guess one of our users could submit a very "heavy" request which brought the server down. Is it possible this request is not in Tomcat logs since it never finished?


Tomcat logs the end-time of the request in the access log so only completed requests are logged. We had a similar issue and a similar suspicion. Using WireShark we monitored all traffic and discovered the requests which caused our problem.

A better idea would be to put an Apache Server in front of tomcat and log there, alternatively a load balance could perform the same function.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.