We have 6 machines serving a web services application. The application is 
deployed on tomcat 6.0.24. We are using log4j for logging. We have log4j 
configured to roll over at midnight. Every night when the logs are rolled 1-3 
of the instances stops logging. There is always one exception in the new log 
and nothing else. The instance continues to run normally. We know that from the 
tomcat logs. The following exception is in the log. It is always this same 
exception. It looks to me like your basic lost connection on upload problem.

My theory is that the upload started before midnight and that the thread wrote 
to the log, and some how this write caused the process to keep the log open. 
When the rolling appender tried to roll the log it could not because the file 
is open. Sometime after midnight the upload looses connection and that 
exception is written to the opened log.

That doesn't make complete sense though, because I would think to see all of 
yesterdays log messages in the log.

Any ideas what is going on here? Suggestions for next steps in trying to debug 
this? I've also included the log4j configuration file.

Thanks for any help.
Michael-

---------------

[2010-10-22 06:04:43,126] ERROR - 
org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/ddp].[spring] - 
Servlet.service() for servlet spring threw exception
java.net.SocketTimeoutException: Read timed out
        at java.net.SocketInputStream.socketRead0(Native Method)
        at java.net.SocketInputStream.read(SocketInputStream.java:129)
        at 
org.apache.coyote.http11.InternalInputBuffer.fill(InternalInputBuffer.java:751)
        at 
org.apache.coyote.http11.InternalInputBuffer$InputStreamInputBuffer.doRead(InternalInputBuffer.java:781)
        at 
org.apache.coyote.http11.filters.IdentityInputFilter.doRead(IdentityInputFilter.java:116)
        at 
org.apache.coyote.http11.InternalInputBuffer.doRead(InternalInputBuffer.java:710)
        at org.apache.coyote.Request.doRead(Request.java:428)
        at 
org.apache.catalina.connector.InputBuffer.realReadBytes(InputBuffer.java:304)
        at org.apache.tomcat.util.buf.ByteChunk.substract(ByteChunk.java:405)
        at org.apache.catalina.connector.InputBuffer.read(InputBuffer.java:327)
        at 
org.apache.catalina.connector.CoyoteInputStream.read(CoyoteInputStream.java:193)
        at 
org.apache.commons.fileupload.MultipartStream$ItemInputStream.makeAvailable(MultipartStream.java:977)
        at 
org.apache.commons.fileupload.MultipartStream$ItemInputStream.read(MultipartStream.java:887)
        at java.io.InputStream.read(InputStream.java:85)
        at org.apache.commons.fileupload.util.Streams.copy(Streams.java:94)
        at org.apache.commons.fileupload.util.Streams.copy(Streams.java:64)
        at 
org.apache.commons.fileupload.FileUploadBase.parseRequest(FileUploadBase.java:362)
        at 
org.apache.commons.fileupload.servlet.ServletFileUpload.parseRequest(ServletFileUpload.java:126)
        at 
org.springframework.web.multipart.commons.CommonsMultipartResolver.parseRequest(CommonsMultipartResolver.java:155)
        at 
org.springframework.web.multipart.commons.CommonsMultipartResolver.resolveMultipart(CommonsMultipartResolver.java:138)
        at 
org.springframework.web.servlet.DispatcherServlet.checkMultipart(DispatcherServlet.java:907)
        at 
org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:750)
        at 
org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:719)
        at 
org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:644)
        at 
org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:560)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:637)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
        at 
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
        at 
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
        at 
com.adobe.ddp.http.MultipartContentTypeFilter.doFilter(MultipartContentTypeFilter.java:22)
        at 
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
        at 
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
        at 
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
        at 
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
        at 
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
        at 
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
        at 
org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:555)
        at 
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
        at 
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298)
        at 
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:852)
        at 
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:588)
        at 
org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)
        at java.lang.Thread.run(Thread.java:619)


--------------

# Set root category priority to INFO and its only appender to DAILY.
log4j.rootLogger=INFO, DAILY
#log4j.rootLogger=INFO, CONSOLE, DAILY

# Set the switchback logger category to WARN (and its only appender to DAILY).
log4j.logger.com.adobe.switchback=WARN
#log4j.logger.com.adobe.switchback=DEBUG, CONSOLE

# configure the console appender
log4j.appender.CONSOLE=org.apache.log4j.ConsoleAppender
log4j.appender.CONSOLE.layout=org.apache.log4j.PatternLayout
# Set the conversion pattern 
(http://logging.apache.org/log4j/1.2/apidocs/org/apache/log4j/PatternLayout.html)
# WARNING generating information for the following parameters are extremely 
slow:
#       %C %F %l %L %M
#log4j.appender.CONSOLE.layout.ConversionPattern=[%d{ISO8601}]%5p%6.6r[%t]%x - 
%C.%M(%F:%L) - %m%n
log4j.appender.CONSOLE.layout.ConversionPattern=[%d{ISO8601}] %p - %c - %m%n

# configure the daily rolling file appender
log4j.appender.DAILY=org.apache.log4j.DailyRollingFileAppender
log4j.appender.DAILY.File=../logs/log4j.log
# Rollover at midnight each day.
log4j.appender.DAILY.DatePattern='.'yyyy-MM-dd

log4j.appender.DAILY.layout=org.apache.log4j.PatternLayout
# Set the conversion pattern 
(http://logging.apache.org/log4j/1.2/apidocs/org/apache/log4j/PatternLayout.html)
# WARNING generating information for the following parameters are extremely 
slow:
#       %C %F %l %L %M
#log4j.appender.DAILY.layout.ConversionPattern=[%d{ISO8601}]%5p%6.6r[%t]%x - 
%C.%M(%F:%L) - %m%n
log4j.appender.DAILY.layout.ConversionPattern=[%d{ISO8601}] %p - %c - %m%n

# Supported by RollingFileAppender but NOT by DailyRollingFileAppender
# Control the maximum log file size
#log4j.appender.DAILY.MaxFileSize=100KB
# Archive log files (one backup file here)
#log4j.appender.DAILY.MaxBackupIndex=1
          



---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-user-unsubscr...@logging.apache.org
For additional commands, e-mail: log4j-user-h...@logging.apache.org

Reply via email to