SUM: Tomcat dies at 167M

2004-10-05 Thread Shannon Scott
Thank you all who sent help.
We have a large number of jsp pages.
Our problem was fixed by setting the MaxPermSize  ( -XX:MaxPermSize=256m
).
We plan to retool our pages and make them html served by apache, with an
iframe to a single jsp page that will handle the dynamic content.
Take Care.
Shannon


-Original Message-
From: Shannon Scott [mailto:[EMAIL PROTECTED] 
Sent: Thursday, September 23, 2004 11:20 AM
To: [EMAIL PROTECTED]
Subject: Tomcat dies at 167M

Greetings,
Tomcat is running, and was working fine until the memory usage went up
to 167, now none of the .jsp pages will respond ( the server hangs
forever ).
The last entries from the Catalina.out are :
java.lang.OutOfMemoryError
java.lang.OutOfMemoryError
java.lang.OutOfMemoryError
 
I don't understand how the JVM could be our of memory because I set it
to use 256M.  
So the last time this happened, I wrote a piece of code that would leak
some memory thinking that might be somehow related, but the tomcat
process used more than 167M when I tested that page.
 
 
I have set the CATALINA_OPTS=-Xms64M -Xmx256M, and everything looks
right when I list the processes.
ps -elf | grep tomcat :
 
0 S tomcat4  17629 1  0  85   0- 315671 schedu Sep21 ?
00:00:04 /usr/java/j2sdk1.4.2_03/bin/java -Xms64M -Xmx256M.
 
However, after the system shows 167M in top, tomcat no longer responds.
None of the tomcat logs are written to, and I find this in the mod_jk
log :
 
[Thu Sep 23 11:00:03 2004]  [jk_ajp_common.c (738)]: ERROR: can't
receive the response message from tomcat, network problems or tomcat is
down. err=-104
[Thu Sep 23 11:00:03 2004]  [jk_ajp_common.c (1137)]: Error reading
reply from tomcat. Tomcat is down or network problems.
[Thu Sep 23 11:00:03 2004]  [jk_ajp_common.c (1290)]: ERROR: Receiving
from tomcat failed, recoverable operation. err=0
[Thu Sep 23 11:00:03 2004]  [jk_ajp_common.c (1309)]: sending request to
tomcat failed in send loop. err=0
 
top output :
 
  PIDUSER PRI  NI  SIZE  RSS SHARE STAT %CPU %MEM   TIME CPU
COMMAND
17629  tomcat4   250  167M 140M 12484 S 0.0  6.9  15:40   0 java
 
RedHat Linux ES 3.0
Apache 2.0.46 with ( mod_jk )
Tomcat 4.1.24
Sun j2sdk 1.4.2_03
 
I am confused.  Any help is greatly appreciated.  Please let me know if
I can provide any more informative details.  
Thank you for your time.
Take Care.
Shannon
 
PS
I have searched list archives and read the docs about tomcat
OutOfMemoryError, but none seem to address my problem.


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



Re: Tomcat dies at 167M

2004-09-24 Thread emmett
It's possible that you are out of file descriptors.
Find and use 'lsof' (ls open files) running it against that process.
I've seen Java report OOM when it can not allocate a file because
a File is nothing more than another object associated with the resource.

If this is the case you will have to figure out where you are not releasing
files or sockets and resolve the problem. 



On Thu, 23 Sep 2004 11:19:35 -0400, Shannon Scott [EMAIL PROTECTED] wrote:
 Greetings,
 Tomcat is running, and was working fine until the memory usage went up
 to 167, now none of the .jsp pages will respond ( the server hangs
 forever ).
 The last entries from the Catalina.out are :
 java.lang.OutOfMemoryError
 java.lang.OutOfMemoryError
 java.lang.OutOfMemoryError
 
 I don't understand how the JVM could be our of memory because I set it
 to use 256M.
 So the last time this happened, I wrote a piece of code that would leak
 some memory thinking that might be somehow related, but the tomcat
 process used more than 167M when I tested that page.
 
 I have set the CATALINA_OPTS=-Xms64M -Xmx256M, and everything looks
 right when I list the processes.
 ps -elf | grep tomcat :
 
 0 S tomcat4  17629 1  0  85   0- 315671 schedu Sep21 ?
 00:00:04 /usr/java/j2sdk1.4.2_03/bin/java -Xms64M -Xmx256M.
 
 However, after the system shows 167M in top, tomcat no longer responds.
 None of the tomcat logs are written to, and I find this in the mod_jk
 log :
 
 [Thu Sep 23 11:00:03 2004]  [jk_ajp_common.c (738)]: ERROR: can't
 receive the response message from tomcat, network problems or tomcat is
 down. err=-104
 [Thu Sep 23 11:00:03 2004]  [jk_ajp_common.c (1137)]: Error reading
 reply from tomcat. Tomcat is down or network problems.
 [Thu Sep 23 11:00:03 2004]  [jk_ajp_common.c (1290)]: ERROR: Receiving
 from tomcat failed, recoverable operation. err=0
 [Thu Sep 23 11:00:03 2004]  [jk_ajp_common.c (1309)]: sending request to
 tomcat failed in send loop. err=0
 
 top output :
 
  PIDUSER PRI  NI  SIZE  RSS SHARE STAT %CPU %MEM   TIME CPU
 COMMAND
 17629  tomcat4   250  167M 140M 12484 S 0.0  6.9  15:40   0 java
 
 RedHat Linux ES 3.0
 Apache 2.0.46 with ( mod_jk )
 Tomcat 4.1.24
 Sun j2sdk 1.4.2_03
 
 I am confused.  Any help is greatly appreciated.  Please let me know if
 I can provide any more informative details.
 Thank you for your time.
 Take Care.
 Shannon
 
 PS
 I have searched list archives and read the docs about tomcat
 OutOfMemoryError, but none seem to address my problem.
 


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



Tomcat dies at 167M

2004-09-23 Thread Shannon Scott
Greetings,
Tomcat is running, and was working fine until the memory usage went up
to 167, now none of the .jsp pages will respond ( the server hangs
forever ).
The last entries from the Catalina.out are :
java.lang.OutOfMemoryError
java.lang.OutOfMemoryError
java.lang.OutOfMemoryError
 
I don't understand how the JVM could be our of memory because I set it
to use 256M.  
So the last time this happened, I wrote a piece of code that would leak
some memory thinking that might be somehow related, but the tomcat
process used more than 167M when I tested that page.
 
 
I have set the CATALINA_OPTS=-Xms64M -Xmx256M, and everything looks
right when I list the processes.
ps -elf | grep tomcat :
 
0 S tomcat4  17629 1  0  85   0- 315671 schedu Sep21 ?
00:00:04 /usr/java/j2sdk1.4.2_03/bin/java -Xms64M -Xmx256M.
 
However, after the system shows 167M in top, tomcat no longer responds.
None of the tomcat logs are written to, and I find this in the mod_jk
log :
 
[Thu Sep 23 11:00:03 2004]  [jk_ajp_common.c (738)]: ERROR: can't
receive the response message from tomcat, network problems or tomcat is
down. err=-104
[Thu Sep 23 11:00:03 2004]  [jk_ajp_common.c (1137)]: Error reading
reply from tomcat. Tomcat is down or network problems.
[Thu Sep 23 11:00:03 2004]  [jk_ajp_common.c (1290)]: ERROR: Receiving
from tomcat failed, recoverable operation. err=0
[Thu Sep 23 11:00:03 2004]  [jk_ajp_common.c (1309)]: sending request to
tomcat failed in send loop. err=0
 
top output :
 
  PIDUSER PRI  NI  SIZE  RSS SHARE STAT %CPU %MEM   TIME CPU
COMMAND
17629  tomcat4   250  167M 140M 12484 S 0.0  6.9  15:40   0 java
 
RedHat Linux ES 3.0
Apache 2.0.46 with ( mod_jk )
Tomcat 4.1.24
Sun j2sdk 1.4.2_03
 
I am confused.  Any help is greatly appreciated.  Please let me know if
I can provide any more informative details.  
Thank you for your time.
Take Care.
Shannon
 
PS
I have searched list archives and read the docs about tomcat
OutOfMemoryError, but none seem to address my problem.


Re: Tomcat dies at 167M

2004-09-23 Thread Jacob Kjome
Quoting Shannon Scott [EMAIL PROTECTED]:

 Greetings,
 Tomcat is running, and was working fine until the memory usage went up
 to 167, now none of the .jsp pages will respond ( the server hangs
 forever ).
 The last entries from the Catalina.out are :
 java.lang.OutOfMemoryError
 java.lang.OutOfMemoryError
 java.lang.OutOfMemoryError

 I don't understand how the JVM could be our of memory because I set it
 to use 256M.
 So the last time this happened, I wrote a piece of code that would leak
 some memory thinking that might be somehow related, but the tomcat
 process used more than 167M when I tested that page.


 I have set the CATALINA_OPTS=-Xms64M -Xmx256M, and everything looks

Well it could be because -Xmx256M means absolutely nothing to the VM.  You
need to use -Xmx256m.  Notice the case of the m.  It is *very* important.

Jake

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



Re: Tomcat dies at 167M

2004-09-23 Thread Dale Lum
 Well it could be because -Xmx256M means absolutely nothing to the VM.  You
 need to use -Xmx256m.  Notice the case of the m.  It is *very* important.

Not according to the docs:

-Xmxn
Specify the maximum size, in bytes, of the memory allocation pool.
This value must a multiple of 1024 greater than 2MB. Append the letter
k or K to indicate kilobytes, or m or M to indicate megabytes. The
default value is 64MB. The upper limit for this value will be
approximately 4000m on Solaris 7 and Solaris 8 SPARC platforms and
2000m on Solaris 2.6 and x86 platforms, minus overhead amounts.
Examples:

   -Xmx83886080
   -Xmx81920k
   -Xmx80m

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



Re: Tomcat dies at 167M

2004-09-23 Thread Jacob Kjome
Quoting Dale Lum [EMAIL PROTECTED]:

  Well it could be because -Xmx256M means absolutely nothing to the VM.
 You
  need to use -Xmx256m.  Notice the case of the m.  It is *very*
 important.

 Not according to the docs:


Ahh... Then I eat my words.  Sorry about that.  I don't know why I remembered
the case as being important?

Jake


 -Xmxn
 Specify the maximum size, in bytes, of the memory allocation pool.
 This value must a multiple of 1024 greater than 2MB. Append the letter
 k or K to indicate kilobytes, or m or M to indicate megabytes. The
 default value is 64MB. The upper limit for this value will be
 approximately 4000m on Solaris 7 and Solaris 8 SPARC platforms and
 2000m on Solaris 2.6 and x86 platforms, minus overhead amounts.
 Examples:

-Xmx83886080
-Xmx81920k
-Xmx80m

 -
 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: Tomcat dies at 167M

2004-09-23 Thread QM
On Thu, Sep 23, 2004 at 12:14:24PM -0500, Jacob Kjome wrote:
: Ahh... Then I eat my words.  Sorry about that.  I don't know why I remembered
: the case as being important?

Depends on the vendor/version of the JDK... just as some care about the
space or equals-sign between the flag and its arg.

-QM

-- 

software  -- http://www.brandxdev.net
tech news -- http://www.RoarNetworX.com


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



RE: Tomcat dies at 167M

2004-09-23 Thread Fournier, Pete
You may be running out of stack, try upping the -Xss setting. In one
application where we did a log of XML parsing and transforming we had to
up this setting. 

Peter Fournier




-Original Message-
From: Jacob Kjome [mailto:[EMAIL PROTECTED] 
Sent: Thursday, September 23, 2004 11:35 AM
To: Tomcat Users List
Subject: Re: Tomcat dies at 167M


Quoting Shannon Scott [EMAIL PROTECTED]:

 Greetings,
 Tomcat is running, and was working fine until the memory usage went up

 to 167, now none of the .jsp pages will respond ( the server hangs 
 forever ). The last entries from the Catalina.out are :
 java.lang.OutOfMemoryError
 java.lang.OutOfMemoryError
 java.lang.OutOfMemoryError

 I don't understand how the JVM could be our of memory because I set it

 to use 256M. So the last time this happened, I wrote a piece of code 
 that would leak some memory thinking that might be somehow related, 
 but the tomcat process used more than 167M when I tested that page.


 I have set the CATALINA_OPTS=-Xms64M -Xmx256M, and everything looks

Well it could be because -Xmx256M means absolutely nothing to the VM.
You need to use -Xmx256m.  Notice the case of the m.  It is *very*
important.

Jake

-
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: Tomcat dies at 167M

2004-09-23 Thread Peter Lin
I would second that advice.  the biggest factor for performance with
XML is having a ton of memory. If the application doesn't use XML, I
would suggest running some benchmarks with a variety of settings to
see which works best.

good luck

peter



On Thu, 23 Sep 2004 15:03:01 -0400, Fournier, Pete
[EMAIL PROTECTED] wrote:
 You may be running out of stack, try upping the -Xss setting. In one
 application where we did a log of XML parsing and transforming we had to
 up this setting.
 
 Peter Fournier
 
 -Original Message-
 From: Jacob Kjome [mailto:[EMAIL PROTECTED]
 Sent: Thursday, September 23, 2004 11:35 AM
 To: Tomcat Users List
 Subject: Re: Tomcat dies at 167M
 
 Quoting Shannon Scott [EMAIL PROTECTED]:
 
  Greetings,
  Tomcat is running, and was working fine until the memory usage went up
 
  to 167, now none of the .jsp pages will respond ( the server hangs
  forever ). The last entries from the Catalina.out are :
  java.lang.OutOfMemoryError
  java.lang.OutOfMemoryError
  java.lang.OutOfMemoryError
 
  I don't understand how the JVM could be our of memory because I set it
 
  to use 256M. So the last time this happened, I wrote a piece of code
  that would leak some memory thinking that might be somehow related,
  but the tomcat process used more than 167M when I tested that page.
 
 
  I have set the CATALINA_OPTS=-Xms64M -Xmx256M, and everything looks
 
 Well it could be because -Xmx256M means absolutely nothing to the VM.
 You need to use -Xmx256m.  Notice the case of the m.  It is *very*
 important.
 
 Jake
 
 -
 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]
 


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