reading tomcat log file every 5 minutes and upload it to ftp server will it cause any performance issues on tomcat, my tomcat is running ona server along with a a simple java application , this application reads the catalina.out file every 5 minutes and upload it to an ftp server , will this cause any issues on tocmat performance?
Becasue I will be reading the logs which tomcat is writing to so my reading and tomcat writing will this cause any issues on tomcat performance ?
It's more of a question about what that would do to the overall performance of the server machine. You're copying a file frequently, so it's making regular hits on the filesystem, network resources and (a little) CPU.
Actually, a more intelligent way of handling this is not to copy the entire file periodically, but to use a networking logger that sends the log information straight to the remote log collection server as it is generated. Less overhead, plus less risk that something will crash while you're replacing the older copy of the logfile, thereby losing potentially useful history.
I don't recall if JULI logging has an option for that or not. Log4J does, although to use Log4J as Tomcat's logger you have to build a custom Tomcat.
Sometimes the only way things ever got fixed is because people became uncomfortable.
Or we might never have existed at all. Freaky. So we should cherish everything. Even this tiny ad:
Free, earth friendly heat - from the CodeRanch trailboss