I have application running on 6 servers and catalina.out logs stop after few days on all servers. the application is working as expected and the access logs also has updating. but not sure why the catalina.out stopped. to restart the logging I need to restart tomcat. this happening every 4-5 days. I am not sure is this tomcat config error or pure application issue. any one experienced similar issu?
2 Answers
Clearly your catalina.out is growing until maximum size fills up and when you restart your Tomcat then catalina.out is purged so logging starts again, and then same story repeats.
Generally catalina.out logging is kept disabled while logging into daily log catalina.yyyy-mm-dd.log.
So, either you need to have a mechanism to purge or truncate it manually on daily basis (else same thing will occur), rotate it or use daily log file mechanism.
Read here which talks about similar issue.
Read here on How to Rotate Tomcat catalina.out

- 14,103
- 5
- 40
- 70
-
thanks for response but that not the case. the disk is only 20% or less used on all servers. also I have a log rotation. – raindrop Dec 02 '15 at 00:50
-
I corrected my answer to not to use disk but file size .. You either need to rotate your cataline.out or use daily log file mechanism .. – hagrawal7777 Dec 02 '15 at 15:09
-
So are you good with this, let me know in case of any question. – hagrawal7777 Dec 03 '15 at 20:14
-
You found some answer ?? – hagrawal7777 Dec 10 '15 at 17:16
One reason can be a logrotate service that configured to roll catalina.out log files. Usually located at: /etc/logrotate.d/tomcat.
Since it is not so trivial to replace process file that used for standard output, the process fails to redirect the output after the catalina.out was replaced.
It is possible to rotate the catalina.out log, but it is not controlled by the standard logging.properties or log4j.properties files. In order to do that you need:
- Use jsvc to start Tomcat then send a SIGUSR1 signal from a log rotation script (logrotate, mv, or any other method).
- Use 'logrotate' with the 'copytruncate' option
- Modify bin/catalina.sh or bin/catalina.bat to pipe output from the JVM into a piped-logger such as chronolog or Apache httpd's rotatelogs

- 2,639
- 24
- 49