Win a copy of Java Database Connections & Transactions (e-book only) this week in the JDBC forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Devaka Cooray
  • Knute Snortum
  • Paul Clapham
  • Tim Cooke
Sheriffs:
  • Liutauras Vilda
  • Jeanne Boyarsky
  • Bear Bibeault
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Ron McLeod
  • Piet Souris
  • Frits Walraven
Bartenders:
  • Ganesh Patekar
  • Tim Holloway
  • salvin francis

Tomcat crashes frequently  RSS feed

 
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello guys,

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?

Thanks in advance.

 
Saloon Keeper
Posts: 5503
143
Android Firefox Browser Mac OS X Safari Tomcat Server VI Editor
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What do you mean by "crashing", exactly? Neither problem sounds like Tomcat is crashing.

As to #1, for any 500 response there should be an entry in one of the log files - examining that should help.

As to #2,what does "it doesn't work" mean? Instead of automating the restart you should rather chase down and fix the underlying problem.
 
Bartender
Posts: 20770
124
Android Eclipse IDE Java Linux Redhat Tomcat Server
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
A "500" error means that your web application failed. Check the web application logs and the catalina.out file for error messages/stack traces.
 
Rakesh Chandru
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
@Tim Moores,

I totally agree to what you said.

By crashing, I mean it's not working.

for #1 Here is the log entries.
95.119.231.107 - - [14/Jan/2016:23:33:18 +0100] "POST /XXXX/rest/moodleservices/service1 HTTP/1.1" 200 27
95.119.231.107 - - [14/Jan/2016:23:33:18 +0100] "POST /XXXX/rest/moodleservices/service2 HTTP/1.1" 500 9258

I couldn't find a suitable reason for this. Could you find any?
 
Rakesh Chandru
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I checked catalina.out file and found the problem to be with database communication. I will check for the exact cause now and work on it. Thanks guys for your useful feedbacks. Cheers
 
Men call me Jim. Women look past me to this tiny ad:
how do I do my own kindle-like thing - without amazon
https://coderanch.com/t/711421/engineering/kindle-amazon
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!