Bug 36713 - How to limit size of Tomcats default stdout log file
Summary: How to limit size of Tomcats default stdout log file
Status: RESOLVED INVALID
Alias: None
Product: Tomcat 5
Classification: Unclassified
Component: Catalina (show other bugs)
Version: 5.0.28
Hardware: All Linux
: P2 major (vote)
Target Milestone: ---
Assignee: Tomcat Developers Mailing List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-09-19 17:22 UTC by John Tal
Modified: 2005-09-23 12:40 UTC (History)
0 users



Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description John Tal 2005-09-19 17:22:06 UTC
It is not clear from the docs how to limit the size of the tomcat stdout log file.

We are using log4j.  Isnt there a way to get log4j properties to apply to the
stdout log file

We have a customer who is running out of disk space due to 100GB+ stdout log
files which are logging stack traces from network errors which they can't fix like:

ClientAbortException:  java.net.SocketException: Connection reset by peer:
socket write error

            at
org.apache.coyote.tomcat5.OutputBuffer.realWriteBytes(OutputBuffer.java:373)

            at org.apache.tomcat.util.buf.ByteChunk.flushBuffer(ByteChunk.java:398)

            at org.apache.tomcat.util.buf.ByteChunk.append(ByteChunk.java:318)

            at
org.apache.coyote.tomcat5.OutputBuffer.writeBytes(OutputBuffer.java:401)

            at org.apache.coyote.tomcat5.OutputBuffer.write(OutputBuffer.java:388)

            at
org.apache.coyote.tomcat5.CoyoteOutputStream.write(CoyoteOutputStream.java:76)

            at com.haht.io.OutputStream.write(OutputStream.java:157)

            at sun.nio.cs.StreamEncoder$CharsetSE.writeBytes(Unknown Source)

            at sun.nio.cs.StreamEncoder$CharsetSE.implFlushBuffer(Unknown Source)

            at sun.nio.cs.StreamEncoder$CharsetSE.implFlush(Unknown Source)

            at sun.nio.cs.StreamEncoder.flush(Unknown Source)

            at java.io.OutputStreamWriter.flush(Unknown Source)

            at java.io.PrintWriter.flush(Unknown Source)

            at com.haht.io.HtmlWriter.print(HtmlWriter.java:77)

            at Suite.HsWorkflowTasks.run(HsWorkflowTasks.java:362)

            at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

            at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)

            at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)

            at java.lang.reflect.Method.invoke(Unknown Source)

            at
com.haht.project.JavaApplication.runDynamicPage(JavaApplication.java:109)

            at com.haht.project.Application.handleDynamic(Application.java:2626)

            at
com.haht.project.Application.processValidRequest(Application.java:2541)

            at com.haht.project.Application.handleRequest(Application.java:2401)

            at com.haht.project.Application.doGet(Application.java:2106)

            at javax.servlet.http.HttpServlet.service(HttpServlet.java:689)

            at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)

            at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:237)

            at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157)

            at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:214)

            at
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)

            at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)

            at
org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:198)

            at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:152)

            at
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)

            at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)

            at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:137)

            at
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)

            at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:118)

            at
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:102)

            at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)

            at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)

            at
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)

            at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)

            at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:929)

            at
org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:160)

            at
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:799)

            at
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:705)

            at
org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:577)

            at
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:683)

            at java.lang.Thread.run(Unknown Source)
Comment 1 Remy Maucherat 2005-09-23 13:15:33 UTC
It's the application that is logging these things to standard output. Plese use
tomcat-user instead.
Comment 2 John Tal 2005-09-23 14:55:42 UTC
Hi, 

The response was incomplete and not understood.  

What do you mean use tomcat-user?  

Are you saying there is some configuration setting to get the logs to log
somewhere as and tomcat-user is an alias within the tomcat runtime?

Are you saying that tomcat-user is another bugzilla area?

No comprende.
Comment 3 Tim Funk 2005-09-23 15:04:21 UTC
Everything you wish to know about tomcat-user

http://jakarta.apache.org/tomcat/faq/tomcatuser.html
Comment 4 John Tal 2005-09-23 20:33:39 UTC
I know it is the application that is logging this stuff.

I want to know from the people who WRITE TOMCAT how to tell TOMCAT that it's
LOGFILE should have some size limits like LOG4J does.

Assume I'm not stupid and that you guys aren't reading what I am typing.

I am looking for an answer from a developer please.
Comment 5 Tim Funk 2005-09-23 20:40:16 UTC
Bugzilla is NOT a support forum. It is for resolving bugs.

The issue described is a configuration problem which can be answered via the
tomcat-users mailing list (or archives).

See http://jakarta.apache.org/tomcat/faq/logging.html for logging help first -
it answers this question.