Sep 22

If you’re Java process (eg. Tomcat) is running out of PermGen space then you can increase the available space with the following JVM command line option


That would for example increase the amount of PermGen space to 512 MB.

written by objects \\ tags: , , , ,

Jul 23

Log4j comes with an appender that will send an email when a logging event occurs. The appender class is and the following gives an example of its configuration

<appender name="LogEmail" class="">
  <param name="BufferSize" value="512" />
  <param name="SMTPHost" value="" />
  <param name="From" value="" />
  <param name="To" value="" />
  <param name="Subject" value="Log from myapp" />
  <layout class="org.apache.log4j.PatternLayout">
    <param name="ConversionPattern"
      value="%p %t %c - %m%n" />

written by objects \\ tags: , ,

Jul 18

The default logging configuration that ships with Tomcat 6.0 logs to both catalina.out and also a daily log catalina.yyyy-mm-dd.log. The daily log starts a new file everyday, but catalina.out just continues to grow until your disk fills up.

To make things worse if you want to purge catalina.out you need to restart tomcat to free up the disk space used as tomcat holds the file open.

To avoid this situation what you can do is remove the logging to catalina.out (by removing the handler). This can be achieved by editting conf/ and changing:

.handlers =, java.util.logging.ConsoleHandler


.handlers =

written by objects \\ tags: , ,