[prev in list] [next in list] [prev in thread] [next in thread] 

List:       log4j-dev
Subject:    DO NOT REPLY [Bug 49481] New: Log4j stops writting to file, and then
From:       bugzilla () apache ! org
Date:       2010-06-21 18:17:27
Message-ID: bug-49481-31091 () https ! issues ! apache ! org/bugzilla/
[Download RAW message or body]

https://issues.apache.org/bugzilla/show_bug.cgi?id=49481

           Summary: Log4j stops writting to file, and then causes server
                    to lockup
           Product: Log4j
           Version: 1.2
          Platform: PC
        OS/Version: Windows Vista
            Status: NEW
          Severity: major
          Priority: P2
         Component: Other
        AssignedTo: log4j-dev@logging.apache.org
        ReportedBy: rveach02@gmail.com


Created an attachment (id=25625)
 --> (https://issues.apache.org/bugzilla/attachment.cgi?id=25625)
2 console outputs, log manager source, and xml file

I am using log4j 1.2.16 in a java application called RPlans. It is being run
with Rational Application Developer 7.5.5.1 on Windows Vista.

Recently, we have been having problems where log4j stops writing to the file,
then later after a MySQL exception, starts spitting out exceptions and causes
the application to become unresponsive.

I have attached the console outputs when this happens, my log manager source
that I use, and my xml file.

Basically my workstation is acting as a Server for my group, as we can not get
a real server at the moment. Every night I reboot my computer before leaving.

Friday (6/21), when the server comes up when I leave, it has access to the log
file and is writing logs in it. By the time Monday comes around, and people
start using the server again, the logger fails to write to the file (there are
messages in the console, but no duplicates in the log file), but it doesn't
spit out any exceptions. Then when someone starts using the MySQL connection,
MySQL creates an exception on the close (which I believe to be a seperate
problem), and after that, log4j spits out exceptions on every use and makes the
server unusable until I manually reboot my computer.

Caused by: java.lang.ArrayIndexOutOfBoundsException: Array index out of range:
512
    at java.io.OutputStreamWriter.write(OutputStreamWriter.java:250)
    at java.io.Writer.write(Writer.java:152)
    at
org.apache.log4j.helpers.CountingQuietWriter.write(CountingQuietWriter.java:45)

We just recently upgraded to Vista from XP and we never had this problem in XP.
This seems to only happen on Monday morning as the server and log4j are fine
the rest of the week. We think maybe the admins are deploying updates to the
computer, which is causing the file link and mysql link to be disrupted. The
log file is being saved to a shared drive, and mysql is running off my computer
too.

Last time this happened, I was also using an old version of log4j (1.1.3)
(represented in 6/7 console output). So the first thing I tried was upgrading
to 1.2.16. The upgrade did produce a different crash (6/7, it just froze on a
wait, 6/21 it produced an out of bounds exception), but the end result was
still the same.

[6/7/10 8:54:38:404 GMT-05:00] 00000012 ThreadMonitor W   WSVR0605W: Thread
"WebContainer : 2" (00000019) has been active for 683784 milliseconds and may
be hung.  There is/are 1 thread(s) in total in the server that may be hung.
    at org.apache.log4j.Category.callAppenders(Category.java:253)
    at org.apache.log4j.Category.forcedLog(Category.java:445)
    at org.apache.log4j.Category.info(Category.java:720)
    at gov.ssa.rplansdomain.utils.LogManager.info(LogManager.java:28)

I'm not sure if there is anyway to fix the link with the file, but is there
anyway to fix log4j so that it doesn't take down the whole server with it?
Thanks for your help.

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-dev-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-dev-help@logging.apache.org

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic