FW: Catalina.out gets to big- Server crashes

2006-02-09 Thread Eddie Dimond
We rotate the catalina.out file using the logrotate program on linux.  The
rotation is based on file size - 10 Meg limit.  We use copytruncate with
compression and maintain 14 rotated files before overwriting the oldest.  

The following is a logrotate script that is placed in the /etc/logrotate.d
directory of the server running the tomcat app:

/home/tc1/tomcat/logs/catalina.out  {
  rotate 14
  size 10M
  copytruncate
  compress
  postrotate
# reset ownership to comply with directory's permissions
chown tc1.apps /home/tc1/tomcat/logs/catalina.out.*
  endscript
  notifempty
  missingok
} 

The man page on lograte is pretty thorough.


-Original Message-
From: Tim Funk [mailto:[EMAIL PROTECTED] 
Sent: Friday, February 03, 2006 8:20 AM
To: Tomcat Users List
Subject: Re: Catalina.out gets to big- Server crashes

http://tomcat.apache.org/faq/logging.html#catalina.out

-Tim

Joost de Heer wrote:
now the question I have is now, how can I here setup jsvc so that it 
uses logrotation,
 
 
 As far as I'm aware catalina.out can't be rotated. For the Tomcat 
 servers I maintain I've written a script that stops/moves 
 catalina.out/gzips catalina.out/starts Tomcat every Sunday night at 
 4am. Not the most elegant solution but it works.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Catalina.out gets to big- Server crashes

2006-02-03 Thread Christian Andersson
I recently came across this problem also (i've read some of the later 
mails in this discussion also and I'm answering to those too) with a 
tomcat 5.5.12 installation and using the ext3 filesystem.


anyway, my setup is using jsvc from the commons daemon project, and the 
catalina.out file is defined in the startup script I'm using for jsvc.. 
and that part looks like this... (this is btw from my developer server 
so ignore the fact that it is not logging to /var/log/...)


$CATALINA_HOME/bin/jsvc \
-user $TOMCAT_USER \
-home $JAVA_HOME \
-pidfile /var/run/jsvc-tomcat.pid \
-Dcatalina.home=$CATALINA_HOME \
-Djava.io.tmpdir=$TMP_DIR \
-outfile $CATALINA_HOME/logs/catalina.out \
-errfile '1' \
$CATALINA_OPTS \
-cp $CLASSPATH \
org.apache.catalina.startup.Bootstrap

here the parameter -outfile is beeing used to tel where the catalina.out 
file is..


now the question I have is now, how can I here setup jsvc so that it 
uses logrotation, I've searched the net 8google, commons daemon) but not 
been able to get a satisfying answer, but perheps the commons-daemon 
folk in their mailing list knows more and I have to ask there...


/Christian Andersson



[EMAIL PROTECTED] wrote:

Hello,

I got this problem that the catalina.out file gets to big. It grows to
a size of approx. 2 gig and then tomcat just crashes. 


Does anyone know how configure tomcat so that catalina.out only get a size
of 100 MB and then replaces it by a new empty catalina.out? The old one
should be saved under a different name. 


cheers,
Pete 



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Catalina.out gets to big- Server crashes

2006-02-03 Thread Joost de Heer
 now the question I have is now, how can I here setup jsvc so that it
 uses logrotation,

As far as I'm aware catalina.out can't be rotated. For the Tomcat servers
I maintain I've written a script that stops/moves catalina.out/gzips
catalina.out/starts Tomcat every Sunday night at 4am. Not the most elegant
solution but it works.

Joost


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Catalina.out gets to big- Server crashes

2006-02-03 Thread Tim Funk

http://tomcat.apache.org/faq/logging.html#catalina.out

-Tim

Joost de Heer wrote:

now the question I have is now, how can I here setup jsvc so that it
uses logrotation,



As far as I'm aware catalina.out can't be rotated. For the Tomcat servers
I maintain I've written a script that stops/moves catalina.out/gzips
catalina.out/starts Tomcat every Sunday night at 4am. Not the most elegant
solution but it works.



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Catalina.out gets to big- Server crashes

2006-02-02 Thread Peter . Neu
Hello,

I got this problem that the catalina.out file gets to big. It grows to
a size of approx. 2 gig and then tomcat just crashes. 

Does anyone know how configure tomcat so that catalina.out only get a size
of 100 MB and then replaces it by a new empty catalina.out? The old one
should be saved under a different name. 

cheers,
Pete 

-- 
Lust, ein paar Euro nebenbei zu verdienen? Ohne Kosten, ohne Risiko!
Satte Provisionen für GMX Partner: http://www.gmx.net/de/go/partner

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Catalina.out gets to big- Server crashes

2006-02-02 Thread Boris Unckel
Good Morning,

 Does anyone know how configure tomcat so that catalina.out only get a size
 of 100 MB and then replaces it by a new empty catalina.out? The old one
 should be saved under a different name. 
 
There is information missing:
Which Tomcat Version?
Which logging API is in use?

Assuming Tomcat 5.5.x with default installation and Tomcat JULI in use:
Change to x4juli (see http://www.x4juli.org and the samples in the
distribution for Tomcat) and use a RollingFileHandler.

Without changing to x4juli (or log4j):
Reduce the log level in conf/logging.properties for the FileHandler to
WARNING or SEVERE. You still have the problem that there is no rolling but
the log amount is reduced.

Regards
Boris

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Catalina.out gets to big- Server crashes

2006-02-02 Thread Peter . Neu
Hello,

sorry, I just clean forgot to tell the version its 5.5.9.

I discovered the tomcat-juli.jar in the bin directory 
so I suppose its in use. Although I never used it so far.

So the idea is to switch x4juli.jar and I get the same functionality
as in log4J? That's great because I'm using it to log my webapps.

So despite this option the only real solution would be to do
it with shell scripts in my linux environment?

cheers,
Pete


 --- Ursprüngliche Nachricht ---
 Von: Boris Unckel [EMAIL PROTECTED]
 An: Tomcat Users List users@tomcat.apache.org
 Betreff: Re: Catalina.out gets to big- Server crashes
 Datum: Thu, 2 Feb 2006 11:20:08 +0100 (MET)
 
 Good Morning,
 
  Does anyone know how configure tomcat so that catalina.out only get a
 size
  of 100 MB and then replaces it by a new empty catalina.out? The old one
  should be saved under a different name. 
  
 There is information missing:
 Which Tomcat Version?
 Which logging API is in use?
 
 Assuming Tomcat 5.5.x with default installation and Tomcat JULI in use:
 Change to x4juli (see http://www.x4juli.org and the samples in the
 distribution for Tomcat) and use a RollingFileHandler.
 
 Without changing to x4juli (or log4j):
 Reduce the log level in conf/logging.properties for the FileHandler to
 WARNING or SEVERE. You still have the problem that there is no rolling but
 the log amount is reduced.
 
 Regards
 Boris
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 

-- 
DSL-Aktion wegen großer Nachfrage bis 28.2.2006 verlängert:
GMX DSL-Flatrate 1 Jahr kostenlos* http://www.gmx.net/de/go/dsl

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Catalina.out gets to big- Server crashes

2006-02-02 Thread Ralph.Grothe
Good Morning Pete,

although I have no Tomcat knowledge whatsoever
(only subscribed to the list in order to learn more and seek for
an answer to my trivia questions)
the fact that your Tomcat crashes when a logfile reached the 2 GB
boundary
in my opinion has nothing to do with Tomcat but rather the
underlying filesystem Tomcat is logging to.
Usually old type filesystems could only write 2^31 bytes unless
the filesystem provided a so
called largefile extension.
Modern journaling filesystems have far higher limits for single
file sizes.
What type of filesystem do you use?
Besides, I'd strongly advise to employ logrotate on your
logfiles.
No admin can comfortably handle logfiles that big.
Any log rotation mechanism would automatically rotate the files
either on a set time interval
or if a set size is reached.

HTH
Ralph

 -Original Message-
 From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
 Sent: Thursday, February 02, 2006 11:09 AM
 To: Tomcat Users List
 Subject: Catalina.out gets to big- Server crashes
 
 
 Hello,
 
 I got this problem that the catalina.out file gets to big. It
grows to
 a size of approx. 2 gig and then tomcat just crashes. 
 
 Does anyone know how configure tomcat so that catalina.out 
 only get a size
 of 100 MB and then replaces it by a new empty catalina.out? 
 The old one
 should be saved under a different name. 
 
 cheers,
 Pete 
 
 -- 
 Lust, ein paar Euro nebenbei zu verdienen? Ohne Kosten, ohne
Risiko!
 Satte Provisionen fur GMX Partner:
http://www.gmx.net/de/go/partner
 

-

 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Catalina.out gets to big- Server crashes

2006-02-02 Thread Peter . Neu
Hello Ralph,

well it's SUSE ES 9. The filesystem is Reiserfs. The system was set up
recently. The server got multiple processors. But I can't tell you more
cause I don't have access to it again until monday.

cheers,
Pete


--- Ursprüngliche Nachricht ---
 Von: [EMAIL PROTECTED]
 An: users@tomcat.apache.org
 Betreff: RE: Catalina.out gets to big- Server crashes
 Datum: Thu, 2 Feb 2006 11:55:39 +0100
 
 Good Morning Pete,
 
 although I have no Tomcat knowledge whatsoever
 (only subscribed to the list in order to learn more and seek for
 an answer to my trivia questions)
 the fact that your Tomcat crashes when a logfile reached the 2 GB
 boundary
 in my opinion has nothing to do with Tomcat but rather the
 underlying filesystem Tomcat is logging to.
 Usually old type filesystems could only write 2^31 bytes unless
 the filesystem provided a so
 called largefile extension.
 Modern journaling filesystems have far higher limits for single
 file sizes.
 What type of filesystem do you use?
 Besides, I'd strongly advise to employ logrotate on your
 logfiles.
 No admin can comfortably handle logfiles that big.
 Any log rotation mechanism would automatically rotate the files
 either on a set time interval
 or if a set size is reached.
 
 HTH
 Ralph
 
  -Original Message-
  From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
  Sent: Thursday, February 02, 2006 11:09 AM
  To: Tomcat Users List
  Subject: Catalina.out gets to big- Server crashes
  
  
  Hello,
  
  I got this problem that the catalina.out file gets to big. It
 grows to
  a size of approx. 2 gig and then tomcat just crashes. 
  
  Does anyone know how configure tomcat so that catalina.out 
  only get a size
  of 100 MB and then replaces it by a new empty catalina.out? 
  The old one
  should be saved under a different name. 
  
  cheers,
  Pete 
  
  -- 
  Lust, ein paar Euro nebenbei zu verdienen? Ohne Kosten, ohne
 Risiko!
  Satte Provisionen fur GMX Partner:
 http://www.gmx.net/de/go/partner
  
 
 -
 
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
  
  
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 

-- 
Telefonieren Sie schon oder sparen Sie noch?
NEU: GMX Phone_Flat http://www.gmx.net/de/go/telefonie

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Catalina.out gets to big- Server crashes

2006-02-02 Thread Boris Unckel
 sorry, I just clean forgot to tell the version its 5.5.9.
 
 I discovered the tomcat-juli.jar in the bin directory 
 so I suppose its in use. Although I never used it so far.
 
 So the idea is to switch x4juli.jar and I get the same functionality
 as in log4J? That's great because I'm using it to log my webapps.
What are you using in your webapps? java.util.logging or log4j?
If you are using java.util.logging in your webapps try x4juli.
If you are using log4j in your webapps try log4j with 
http://tomcat.apache.org/tomcat-5.5-doc/logging.html
http://tomcat.apache.org/faq/logging.html
 
 So despite this option the only real solution would be to do
 it with shell scripts in my linux environment?
This is a bad option. You would move an open file (during Tomcat run) to an
separate name/directory.

Regards
Boris

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Catalina.out gets to big- Server crashes

2006-02-02 Thread Tim Lucia
Which are you using?  Log4j already has a RollingFileAppender (size or date
based, your choice) which rolls logs automatically.  Or, you can use
logrotate on linux.

http://logging.apache.org/log4j/docs/api/org/apache/log4j/DailyRollingFileAp
pender.html
http://logging.apache.org/log4j/docs/api/org/apache/log4j/RollingFileAppende
r.html

Tim

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] 
Sent: Thursday, February 02, 2006 5:32 AM
To: Tomcat Users List
Subject: Re: Catalina.out gets to big- Server crashes


Hello,

sorry, I just clean forgot to tell the version its 5.5.9.

I discovered the tomcat-juli.jar in the bin directory 
so I suppose its in use. Although I never used it so far.

So the idea is to switch x4juli.jar and I get the same functionality as in
log4J? That's great because I'm using it to log my webapps.

So despite this option the only real solution would be to do
it with shell scripts in my linux environment?

cheers,
Pete


 --- Ursprüngliche Nachricht ---
 Von: Boris Unckel [EMAIL PROTECTED]
 An: Tomcat Users List users@tomcat.apache.org
 Betreff: Re: Catalina.out gets to big- Server crashes
 Datum: Thu, 2 Feb 2006 11:20:08 +0100 (MET)
 
 Good Morning,
 
  Does anyone know how configure tomcat so that catalina.out only get 
  a
 size
  of 100 MB and then replaces it by a new empty catalina.out? The old 
  one should be saved under a different name.
  
 There is information missing:
 Which Tomcat Version?
 Which logging API is in use?
 
 Assuming Tomcat 5.5.x with default installation and Tomcat JULI in 
 use: Change to x4juli (see http://www.x4juli.org and the samples in 
 the distribution for Tomcat) and use a RollingFileHandler.
 
 Without changing to x4juli (or log4j):
 Reduce the log level in conf/logging.properties for the FileHandler to 
 WARNING or SEVERE. You still have the problem that there is no rolling 
 but the log amount is reduced.
 
 Regards
 Boris
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 

-- 
DSL-Aktion wegen großer Nachfrage bis 28.2.2006 verlängert:
GMX DSL-Flatrate 1 Jahr kostenlos* http://www.gmx.net/de/go/dsl

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Catalina.out gets to big- Server crashes

2006-02-02 Thread Ralph.Grothe
Ugh, reiserfs is a journalling filesystem and should have no
problems with files larger than 2 GB.

To be on the safe side you could however check here for all
things reiserfs (got the URL from the manpage of mkreiserfs)

http://www.namesys.com/

We also happen to have a SEL9 box running.
There I checked what the stock SuSE kernel got compiled with
(n.b. most distributors place their kernel's config file in the
/boot dir)

# uname -r
2.6.5-7.191-pseries64

# grep -i reiser /boot/config-$(uname -r)
CONFIG_REISERFS_FS=y
# CONFIG_REISERFS_CHECK is not set
CONFIG_REISERFS_PROC_INFO=y
CONFIG_REISERFS_FS_XATTR=y
CONFIG_REISERFS_FS_POSIX_ACL=y
CONFIG_REISERFS_FS_SECURITY=y

Looks only REISERFS_CHECK isn't enabled.

# rpm -qa|grep -i reiser
reiserfs-3.6.19-3.2

# rpm -ql reiserfs
/sbin/debugreiserfs
/sbin/fsck.reiserfs
/sbin/mkfs.reiserfs
/sbin/mkreiserfs
/sbin/reiserfsck
/sbin/reiserfstune
/sbin/resize_reiserfs
/usr/share/man/man8/debugreiserfs.8.gz
/usr/share/man/man8/fsck.reiserfs.8.gz
/usr/share/man/man8/mkfs.reiserfs.8.gz
/usr/share/man/man8/mkreiserfs.8.gz
/usr/share/man/man8/reiserfsck.8.gz
/usr/share/man/man8/reiserfstune.8.gz
/usr/share/man/man8/resize_reiserfs.8.gz

I guess your Reiserfs support looks pretty similar.
I checked the mount options for Reiserfs but couldn't find any
hint at all relating to large files.

Anyway, this isn't getting you any further,
and I guess it must then be another Tomcat imposed restriction.

I can remember that I ran into troubles when I built Net-SNMP
from the sources on hpux with the ANSI C HP compiler
until I realized that the application was only 32bit capable.

I know that Java once emerged with the posture to erradicate any
type mismatches
but who can tell what kind of mappings JVMs on different platform
behind the scenes.

Nevertheless, I wouldn't let my logfiles grow that large.
As I said, no standard editor or pager is handling such beasts
satisfactorily.
Since you are running Linux anyway you also should have logrotate
on board.
Run rpm -qi logrotate to check.
logrotate is very easy to set up.
Once added a stanza for your tomcat logs you should never ever
worry about files becoming too large or filesystems getting full.
Just see man logrotate, there are examples in it.



 -Original Message-
 From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
 Sent: Thursday, February 02, 2006 12:20 PM
 To: Tomcat Users List
 Subject: RE: Catalina.out gets to big- Server crashes
 
 
 Hello Ralph,
 
 well it's SUSE ES 9. The filesystem is Reiserfs. The system was
set up
 recently. The server got multiple processors. But I can't 
 tell you more
 cause I don't have access to it again until monday.
 
 cheers,
 Pete
 
 
 --- Ursprüngliche Nachricht ---
  Von: [EMAIL PROTECTED]
  An: users@tomcat.apache.org
  Betreff: RE: Catalina.out gets to big- Server crashes
  Datum: Thu, 2 Feb 2006 11:55:39 +0100
  
  Good Morning Pete,
  
  although I have no Tomcat knowledge whatsoever
  (only subscribed to the list in order to learn more and seek
for
  an answer to my trivia questions)
  the fact that your Tomcat crashes when a logfile reached the
2 GB
  boundary
  in my opinion has nothing to do with Tomcat but rather the
  underlying filesystem Tomcat is logging to.
  Usually old type filesystems could only write 2^31 bytes
unless
  the filesystem provided a so
  called largefile extension.
  Modern journaling filesystems have far higher limits for
single
  file sizes.
  What type of filesystem do you use?
  Besides, I'd strongly advise to employ logrotate on your
  logfiles.
  No admin can comfortably handle logfiles that big.
  Any log rotation mechanism would automatically rotate the
files
  either on a set time interval
  or if a set size is reached.
  
  HTH
  Ralph
  
   -Original Message-
   From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
   Sent: Thursday, February 02, 2006 11:09 AM
   To: Tomcat Users List
   Subject: Catalina.out gets to big- Server crashes
   
   
   Hello,
   
   I got this problem that the catalina.out file gets to big.
It
  grows to
   a size of approx. 2 gig and then tomcat just crashes. 
   
   Does anyone know how configure tomcat so that catalina.out 
   only get a size
   of 100 MB and then replaces it by a new empty catalina.out?

   The old one
   should be saved under a different name. 
   
   cheers,
   Pete 
   
   -- 
   Lust, ein paar Euro nebenbei zu verdienen? Ohne Kosten,
ohne
  Risiko!
   Satte Provisionen fur GMX Partner:
  http://www.gmx.net/de/go/partner
   
  
 
-
  
   To unsubscribe, e-mail: [EMAIL PROTECTED]
   For additional commands, e-mail:
[EMAIL PROTECTED]
   
   
  
  

-

  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
  
 
 -- 
 Telefonieren Sie schon oder sparen Sie noch?
 NEU: GMX Phone_Flat http://www.gmx.net/de/go/telefonie