You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Matt Sales <sa...@sealsco.com> on 2003/05/08 23:38:45 UTC

java.lang.OutOfMemoryError

Hello,
I'm running 4.1.18 on RH7.2, with sun's jvm 4.1.1.

I'm getting a lot of "out of memory" errors during expensive processes, like
accessing thousands of lines from a database.

Is there a way to allow more memory space to tomcat in general, or certain
contexts specifically?

The stack trace is enormous, or I'd include it.  The problem does seem to
lie with tomcat rather than the JVM.

Thanks,
Matt


---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


Re: java.lang.OutOfMemoryError

Posted by Lajos <la...@galatea.com>.
Hi Matt -

There are lots of reasons why this could be happening, ranging from a 
know memory leak in JDK 1.4.1_01 to database result sets not being 
closed or being poorly managed. We'd need to know more about your app to 
say for sure.

That being said, you could always increase the heap size with the -mx 
option. Alternatively, you could isolate your application a separate JVM 
and tune the JVM parameters for the apps needs.

Regards,

Lajos


Matt Sales wrote:
> Hello,
> I'm running 4.1.18 on RH7.2, with sun's jvm 4.1.1.
> 
> I'm getting a lot of "out of memory" errors during expensive processes, like
> accessing thousands of lines from a database.
> 
> Is there a way to allow more memory space to tomcat in general, or certain
> contexts specifically?
> 
> The stack trace is enormous, or I'd include it.  The problem does seem to
> lie with tomcat rather than the JVM.
> 
> Thanks,
> Matt
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
> 
> 


-- 



                    Lajos Moczar
       ----------------------------------------
     Open Source Support, Consulting and Training
       ----------------------------------------
             Cocoon Developer's Handbook
  (www.amazon.com/exec/obidos/tg/detail/-/0672322579)

                    _      _____
                   / \         /
                  /___\      /
                 /     \   /____

      http://www.galatea.com -- powered by AzSSL


---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


reference to tomcat engine from a web application

Posted by Asif Jan <as...@cern.ch>.
Hi
Is there any way to get a reference to Tomcat container from a web
application? (through tomcat API)

Thanks
Asif

-----Original Message-----
From: Tim Funk [mailto:funkman@joedog.org]
Sent: Friday, May 09, 2003 1:04 PM
To: Tomcat Users List
Subject: Re: JBoss with integrated Tomcat memory question


In catalina.sh:
<snip>
#   JAVA_OPTS       (Optional) Java runtime options used when the "start",
#                   "stop", or "run" command is executed.

Oops, the script docs aren't as clear as I thought. Do not edit catalina.sh.

<slap who='tim' where='upsidehead'>
   Note to self, make this more clear in FAQ)
</slap>

Anyhoo:

--
export JAVA_OPTS="-Xms1 -Xmx2 -Xint"
export CATALINA_HOME=/opt/more/cowebell
$CATALINA_HOME/bin/startup.sh
( or nohup $CATALINA_HOME/bin/startup.sh & )
--

The above will set your tomcat home and the java options.

-Tim

harm@informatiefabriek.nl wrote:
> Hi all,
>
> I would like to increase the memory settings for my Tomcat server which is
> integrated in my JBoss application Server.
> I read in the Tomcat FAQ that I should edit catalina.sh.
> So I looked in the file, but exactly what and where should I edit this
> file?
>
> Thanks,
>
> Harm de Laat
> Informatiefabriek
> The netherlands
>


---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


Re: JBoss with integrated Tomcat memory question

Posted by Tim Funk <fu...@joedog.org>.
In catalina.sh:
<snip>
#   JAVA_OPTS       (Optional) Java runtime options used when the "start",
#                   "stop", or "run" command is executed.

Oops, the script docs aren't as clear as I thought. Do not edit catalina.sh.

<slap who='tim' where='upsidehead'>
   Note to self, make this more clear in FAQ)
</slap>

Anyhoo:

--
export JAVA_OPTS="-Xms1 -Xmx2 -Xint"
export CATALINA_HOME=/opt/more/cowebell
$CATALINA_HOME/bin/startup.sh
( or nohup $CATALINA_HOME/bin/startup.sh & )
--

The above will set your tomcat home and the java options.

-Tim

harm@informatiefabriek.nl wrote:
> Hi all,
> 
> I would like to increase the memory settings for my Tomcat server which is 
> integrated in my JBoss application Server.
> I read in the Tomcat FAQ that I should edit catalina.sh. 
> So I looked in the file, but exactly what and where should I edit this 
> file?
> 
> Thanks,
> 
> Harm de Laat
> Informatiefabriek
> The netherlands
>  


---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


JBoss with integrated Tomcat memory question

Posted by ha...@informatiefabriek.nl.
Hi all,

I would like to increase the memory settings for my Tomcat server which is 
integrated in my JBoss application Server.
I read in the Tomcat FAQ that I should edit catalina.sh. 
So I looked in the file, but exactly what and where should I edit this 
file?

Thanks,

Harm de Laat
Informatiefabriek
The netherlands

---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


Re: java.lang.OutOfMemoryError

Posted by Tim Funk <fu...@joedog.org>.
These links may help ...
http://tomcatfaq.sourceforge.net/memory.html

-Tim


Matt Sales wrote:
> Hello,
> I'm running 4.1.18 on RH7.2, with sun's jvm 4.1.1.
> 
> I'm getting a lot of "out of memory" errors during expensive processes, like
> accessing thousands of lines from a database.
> 
> Is there a way to allow more memory space to tomcat in general, or certain
> contexts specifically?
> 
> The stack trace is enormous, or I'd include it.  The problem does seem to
> lie with tomcat rather than the JVM.
> 
> Thanks,
> Matt
>  


---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org