• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Tomcat spits out too many and too big exceptions

 
Greenhorn
Posts: 25
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I don't know how to explain this correctly, but when any Java error occurs Tomcat outputs so huge (very long) stack trace of each error so my logs (which are in rotation of 10 files 10MB each) get filled out in seconds!

Happens usually when there is a DB connection issue and some other cases.

On my old server the stack trace of each error is kind of short and errors has only one or two outputs in log, but on new server each error has like 7-9 pages long stack trace and gets replicated many times.

Any idea?

Thanks!
 
Ranch Hand
Posts: 433
Netbeans IDE
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hm... just a random guess:
Are you using Log4j (or is any framework that you are using, using Log4j)? I just remember that I setted the logging-level of a spring-application to 'debug' which generated tons of logging-output.
 
Axel Brown
Greenhorn
Posts: 25
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Joachim Rohde:
Hm... just a random guess:
Are you using Log4j (or is any framework that you are using, using Log4j)? I just remember that I setted the logging-level of a spring-application to 'debug' which generated tons of logging-output.



Log4j, but all settings are with ERROR level only.
When I see the exception in the log it's literally 7-9 pages long - a single exeption...
 
Sheriff
Posts: 13411
Firefox Browser VI Editor Redhat
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I don't think this has anything to do with Tomcat.
Have you verified that the same error is not being thrown repeatedly?
 
Axel Brown
Greenhorn
Posts: 25
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Ben Souther:
I don't think this has anything to do with Tomcat.
Have you verified that the same error is not being thrown repeatedly?



It's the same error just many many times plus its trace is sooo long...
Do you know what it might be?
 
Ben Souther
Sheriff
Posts: 13411
Firefox Browser VI Editor Redhat
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
It's impossible to say what it could be without seeing the exceptions and the code that's causing them to be thrown.

Rather than trying to manipulate Tomcat into reporting less, I think it would be a better idea to track down what ever is throwing exceptions in your code and get those things fixed.
 
Axel Brown
Greenhorn
Posts: 25
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Ben Souther:
It's impossible to say what it could be without seeing the exceptions and the code that's causing them to be thrown.

Rather than trying to manipulate Tomcat into reporting less, I think it would be a better idea to track down what ever is throwing exceptions in your code and get those things fixed.



I know for sure when I shut down DB and my app is trying to connect - I get 10 tomcats logs each 10MB populated in less than a few seconds...
 
Ben Souther
Sheriff
Posts: 13411
Firefox Browser VI Editor Redhat
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Are using Tomcat's connection pooling or are you connecting yourself?

If your app (or the connection pool) is designed to continuously attempt to connect to a non-running database, this should be the expected behavior.
 
reply
    Bookmark Topic Watch Topic
  • New Topic