You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Scott Mueller <sc...@gig.io> on 2008/03/19 18:53:40 UTC
Running out of memory too easily in Tomcat 6.0.16
Hi,
I have a very small and simple Spring + Hibernate application running in
Tomcat 6.0.16. During testing I'm running into many of the following errors
with Tomcat:
javax.servlet.ServletException: java.lang.OutOfMemoryError: PermGen space
I have to shutdown and startup tomcat every 3rd redeployment. So I have 3
questions for anybody generous enough to help me:
Is this normal for a tiny project in the beginning stages of development
(I'm guessing due to Spring & Hibernate)?
What is the proper way to increase memory allocated to Tomcat?
If I have 3gbytes of RAM, should I allocate all 3gbytes or possibly more?
The idea being memory allocated that I don't have will be swap and not cause
tomcat to crash.
Thanks so much for any help.
Re: Running out of memory too easily in Tomcat 6.0.16
Posted by Scott Mueller <sc...@gig.io>.
Thanks Chris! So JAVA_OPTS is where these kinds of parameters go.
On Wed, Mar 19, 2008 at 12:00 PM, Chris Hut <ch...@onetruemedia.com> wrote:
>
> One thing that can help is to increase the PermGen space memory
> allocation in the JVM startup. To do this, add the following flag to
> the Tomcat JAVA_OPTS:
>
> -XX:MaxPermSize=256m
>
> (or another suitable value for you.)
>
> Note however, that this is a workaround and does not solve the core
> issue of a leak in the PermGen space. But we use it to enable more
> webapp deployments before a server restart is needed, so it might be
> part of a solution for you.
>
> Chris
>
> -----Original Message-----
> From: Scott Mueller [mailto:scott@gig.io]
> Sent: Wednesday, March 19, 2008 11:32 AM
> To: Tomcat Users List
> Subject: Re: Running out of memory too easily in Tomcat 6.0.16
>
> Thank you for the response Chuck. Like I said, this is a very simple
> webapp
> (aside from the Spring/Hibernate libraries). Stores nothing ever in any
> sessions and I can't imagine memory leaks with the simple code. Thank
> you
> for those links, I guess I should run a profiler to see exactly what's
> going
> on. In the meantime, what's the proper way to increase the memory
> allocated
> to tomcat? And should I allocate more than my physical ram? Is there a
> general formula for how much ram to allocate to tomcat on a machine
> dedicated to only that function?
>
> On Wed, Mar 19, 2008 at 11:03 AM, Caldarale, Charles R <
> Chuck.Caldarale@unisys.com> wrote:
>
> > > From: Scott Mueller [mailto:scott@gig.io]
> > > Subject: Running out of memory too easily in Tomcat 6.0.16
> > >
> > > I have a very small and simple Spring + Hibernate application
> >
> > Once you throw Spring and Hibernate into the mix, nothing is simple.
> >
> > > javax.servlet.ServletException: java.lang.OutOfMemoryError:
> > > PermGen space
> >
> > Somewhere, you're hanging onto references to objects or classes from
> the
> > prior deployments. ThreadLocal usage is a typical way of doing this,
> as
> > are inappropriate references stored in a Session, but there's no limit
> > to programmer's inventiveness in creating memory leaks.
> >
> > Read the FAQ:
> > http://wiki.apache.org/tomcat/FAQ/Memory
> >
> > Especially this link from there:
> >
> http://opensource.atlassian.com/confluence/spring/pages/viewpage.action?
> >
> pageId=2669<http://opensource.atlassian.com/confluence/spring/pages/view
> page.action?pageId=2669>
> >
> > - Chuck
> >
> >
> > THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE
> PROPRIETARY
> > MATERIAL and is thus for use only by the intended recipient. If you
> > received this in error, please contact the sender and delete the
> e-mail
> > and its attachments from all computers.
> >
> > ---------------------------------------------------------------------
> > To start a new topic, e-mail: users@tomcat.apache.org
> > To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> > For additional commands, e-mail: users-help@tomcat.apache.org
> >
> >
>
> ---------------------------------------------------------------------
> To start a new topic, e-mail: users@tomcat.apache.org
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
>
Re: Running out of memory too easily in Tomcat 6.0.16
Posted by Mark Deneen <md...@gmail.com>.
Caldarale, Charles R wrote:
>> From: Scott Mueller [mailto:scott@gig.io]
>> Subject: Re: Running out of memory too easily in Tomcat 6.0.16
>>
>> Charles, where's the proper place to put the heap/permgen
>> allocation settings in tomcat's scripts?
>>
>
> You don't modify the scripts themselves. Set whatever options you need
> in the JAVA_OPTS environment variable prior to running the scripts. For
> example:
>
> JAVA_OPTS=-XX:MaxPermSize=256m -Dcom.sun.management.jmxremote
>
> (The latter lets you run JConsole against the Tomcat instance.)
>
> - Chuck
>
You can put all of these settings in $CATALINA_HOME/bin/setenv.sh and
the default tomcat scripts will source that script before running java.
Mark
---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
RE: Running out of memory too easily in Tomcat 6.0.16
Posted by "Caldarale, Charles R" <Ch...@unisys.com>.
> From: Scott Mueller [mailto:scott@gig.io]
> Subject: Re: Running out of memory too easily in Tomcat 6.0.16
>
> Charles, where's the proper place to put the heap/permgen
> allocation settings in tomcat's scripts?
You don't modify the scripts themselves. Set whatever options you need
in the JAVA_OPTS environment variable prior to running the scripts. For
example:
JAVA_OPTS=-XX:MaxPermSize=256m -Dcom.sun.management.jmxremote
(The latter lets you run JConsole against the Tomcat instance.)
- Chuck
THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY
MATERIAL and is thus for use only by the intended recipient. If you
received this in error, please contact the sender and delete the e-mail
and its attachments from all computers.
---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
Re: Running out of memory too easily in Tomcat 6.0.16
Posted by Scott Mueller <sc...@gig.io>.
Thanks again guys for these responses, this is helping me understand what's
going on. Charles, where's the proper place to put the heap/permgen
allocation settings in tomcat's scripts? I very briefly ran through the
various scripts tomcat uses to startup, but I didn't see an obvious place to
enter the memory sizes.
On Wed, Mar 19, 2008 at 11:48 AM, Caldarale, Charles R <
Chuck.Caldarale@unisys.com> wrote:
> > From: Scott Mueller [mailto:scott@gig.io]
> > Subject: Re: Running out of memory too easily in Tomcat 6.0.16
> >
> > Stores nothing ever in any sessions and I can't imagine
> > memory leaks with the simple code.
>
> You can't ignore the Spring and Hibernate libraries, which could easily
> be the cause of the problem.
>
> > In the meantime, what's the proper way to increase the
> > memory allocated to tomcat?
>
> Use -XX:MaxPermSize=xx to increase the space reserved for classes. This
> is only a stopgap, since your memory leak still exists. References for
> heap and GC management are here:
> http://java.sun.com/javase/technologies/hotspot/gc/index.jsp
>
> Most of that is related to the main Java heap rather than PermGen, so is
> probably not pertinent to your situation. Use JConsole to find out
> what's actually going on inside the JVM memory spaces.
>
> > And should I allocate more than my physical ram?
>
> Definitely not - that will cause page thrashing and kill your
> performance.
>
> > Is there a general formula for how much ram to allocate to
> > tomcat on a machine dedicated to only that function?
>
> No, because Tomcat itself uses very little of the heap; it's pretty much
> all dependent on the webapp(s) you're running.
>
> - Chuck
>
>
> THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY
> MATERIAL and is thus for use only by the intended recipient. If you
> received this in error, please contact the sender and delete the e-mail
> and its attachments from all computers.
>
> ---------------------------------------------------------------------
> To start a new topic, e-mail: users@tomcat.apache.org
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
>
RE: Running out of memory too easily in Tomcat 6.0.16
Posted by "Caldarale, Charles R" <Ch...@unisys.com>.
> From: Scott Mueller [mailto:scott@gig.io]
> Subject: Re: Running out of memory too easily in Tomcat 6.0.16
>
> Stores nothing ever in any sessions and I can't imagine
> memory leaks with the simple code.
You can't ignore the Spring and Hibernate libraries, which could easily
be the cause of the problem.
> In the meantime, what's the proper way to increase the
> memory allocated to tomcat?
Use -XX:MaxPermSize=xx to increase the space reserved for classes. This
is only a stopgap, since your memory leak still exists. References for
heap and GC management are here:
http://java.sun.com/javase/technologies/hotspot/gc/index.jsp
Most of that is related to the main Java heap rather than PermGen, so is
probably not pertinent to your situation. Use JConsole to find out
what's actually going on inside the JVM memory spaces.
> And should I allocate more than my physical ram?
Definitely not - that will cause page thrashing and kill your
performance.
> Is there a general formula for how much ram to allocate to
> tomcat on a machine dedicated to only that function?
No, because Tomcat itself uses very little of the heap; it's pretty much
all dependent on the webapp(s) you're running.
- Chuck
THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY
MATERIAL and is thus for use only by the intended recipient. If you
received this in error, please contact the sender and delete the e-mail
and its attachments from all computers.
---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
Re: Running out of memory too easily in Tomcat 6.0.16
Posted by David Fisher <df...@jmlafferty.com>.
PermGen Space is where classes live.
One of the links on the FAQ should get you on track:
http://opensource.atlassian.com/confluence/spring/pages/
viewpage.action?pageId=2669
You are likely doing something seemingly innocent, but there is
actually a problem.
I got similar errors to yours when I had too many simultaneous
instances of the same webapp (Apache Roller 4). I ended up with 16000
classes loaded.
I now have a goofy config due to hacking that issue and my logging
doesn't work as I want. But my few nagging memory problems are
solved, ok. I haven't had the "luxury" of truly figuring out the
issues. I hope that you do.
Regards,
Dave
On Mar 19, 2008, at 1:32 PM, Scott Mueller wrote:
> Thank you for the response Chuck. Like I said, this is a very
> simple webapp
> (aside from the Spring/Hibernate libraries). Stores nothing ever
> in any
> sessions and I can't imagine memory leaks with the simple code.
> Thank you
> for those links, I guess I should run a profiler to see exactly
> what's going
> on. In the meantime, what's the proper way to increase the memory
> allocated
> to tomcat? And should I allocate more than my physical ram? Is
> there a
> general formula for how much ram to allocate to tomcat on a machine
> dedicated to only that function?
>
> On Wed, Mar 19, 2008 at 11:03 AM, Caldarale, Charles R <
> Chuck.Caldarale@unisys.com> wrote:
>
>>> From: Scott Mueller [mailto:scott@gig.io]
>>> Subject: Running out of memory too easily in Tomcat 6.0.16
>>>
>>> I have a very small and simple Spring + Hibernate application
>>
>> Once you throw Spring and Hibernate into the mix, nothing is simple.
>>
>>> javax.servlet.ServletException: java.lang.OutOfMemoryError:
>>> PermGen space
>>
>> Somewhere, you're hanging onto references to objects or classes
>> from the
>> prior deployments. ThreadLocal usage is a typical way of doing
>> this, as
>> are inappropriate references stored in a Session, but there's no
>> limit
>> to programmer's inventiveness in creating memory leaks.
>>
>> Read the FAQ:
>> http://wiki.apache.org/tomcat/FAQ/Memory
>>
>> Especially this link from there:
>> http://opensource.atlassian.com/confluence/spring/pages/
>> viewpage.action?
>> pageId=2669<http://opensource.atlassian.com/confluence/spring/
>> pages/viewpage.action?pageId=2669>
>>
>> - Chuck
>>
>>
>> THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE
>> PROPRIETARY
>> MATERIAL and is thus for use only by the intended recipient. If you
>> received this in error, please contact the sender and delete the e-
>> mail
>> and its attachments from all computers.
>>
>> ---------------------------------------------------------------------
>> To start a new topic, e-mail: users@tomcat.apache.org
>> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
>> For additional commands, e-mail: users-help@tomcat.apache.org
>>
>>
---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
RE: Running out of memory too easily in Tomcat 6.0.16
Posted by Chris Hut <ch...@onetruemedia.com>.
One thing that can help is to increase the PermGen space memory
allocation in the JVM startup. To do this, add the following flag to
the Tomcat JAVA_OPTS:
-XX:MaxPermSize=256m
(or another suitable value for you.)
Note however, that this is a workaround and does not solve the core
issue of a leak in the PermGen space. But we use it to enable more
webapp deployments before a server restart is needed, so it might be
part of a solution for you.
Chris
-----Original Message-----
From: Scott Mueller [mailto:scott@gig.io]
Sent: Wednesday, March 19, 2008 11:32 AM
To: Tomcat Users List
Subject: Re: Running out of memory too easily in Tomcat 6.0.16
Thank you for the response Chuck. Like I said, this is a very simple
webapp
(aside from the Spring/Hibernate libraries). Stores nothing ever in any
sessions and I can't imagine memory leaks with the simple code. Thank
you
for those links, I guess I should run a profiler to see exactly what's
going
on. In the meantime, what's the proper way to increase the memory
allocated
to tomcat? And should I allocate more than my physical ram? Is there a
general formula for how much ram to allocate to tomcat on a machine
dedicated to only that function?
On Wed, Mar 19, 2008 at 11:03 AM, Caldarale, Charles R <
Chuck.Caldarale@unisys.com> wrote:
> > From: Scott Mueller [mailto:scott@gig.io]
> > Subject: Running out of memory too easily in Tomcat 6.0.16
> >
> > I have a very small and simple Spring + Hibernate application
>
> Once you throw Spring and Hibernate into the mix, nothing is simple.
>
> > javax.servlet.ServletException: java.lang.OutOfMemoryError:
> > PermGen space
>
> Somewhere, you're hanging onto references to objects or classes from
the
> prior deployments. ThreadLocal usage is a typical way of doing this,
as
> are inappropriate references stored in a Session, but there's no limit
> to programmer's inventiveness in creating memory leaks.
>
> Read the FAQ:
> http://wiki.apache.org/tomcat/FAQ/Memory
>
> Especially this link from there:
>
http://opensource.atlassian.com/confluence/spring/pages/viewpage.action?
>
pageId=2669<http://opensource.atlassian.com/confluence/spring/pages/view
page.action?pageId=2669>
>
> - Chuck
>
>
> THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE
PROPRIETARY
> MATERIAL and is thus for use only by the intended recipient. If you
> received this in error, please contact the sender and delete the
e-mail
> and its attachments from all computers.
>
> ---------------------------------------------------------------------
> To start a new topic, e-mail: users@tomcat.apache.org
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
>
---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
Re: Running out of memory too easily in Tomcat 6.0.16
Posted by Scott Mueller <sc...@gig.io>.
Thank you for the response Chuck. Like I said, this is a very simple webapp
(aside from the Spring/Hibernate libraries). Stores nothing ever in any
sessions and I can't imagine memory leaks with the simple code. Thank you
for those links, I guess I should run a profiler to see exactly what's going
on. In the meantime, what's the proper way to increase the memory allocated
to tomcat? And should I allocate more than my physical ram? Is there a
general formula for how much ram to allocate to tomcat on a machine
dedicated to only that function?
On Wed, Mar 19, 2008 at 11:03 AM, Caldarale, Charles R <
Chuck.Caldarale@unisys.com> wrote:
> > From: Scott Mueller [mailto:scott@gig.io]
> > Subject: Running out of memory too easily in Tomcat 6.0.16
> >
> > I have a very small and simple Spring + Hibernate application
>
> Once you throw Spring and Hibernate into the mix, nothing is simple.
>
> > javax.servlet.ServletException: java.lang.OutOfMemoryError:
> > PermGen space
>
> Somewhere, you're hanging onto references to objects or classes from the
> prior deployments. ThreadLocal usage is a typical way of doing this, as
> are inappropriate references stored in a Session, but there's no limit
> to programmer's inventiveness in creating memory leaks.
>
> Read the FAQ:
> http://wiki.apache.org/tomcat/FAQ/Memory
>
> Especially this link from there:
> http://opensource.atlassian.com/confluence/spring/pages/viewpage.action?
> pageId=2669<http://opensource.atlassian.com/confluence/spring/pages/viewpage.action?pageId=2669>
>
> - Chuck
>
>
> THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY
> MATERIAL and is thus for use only by the intended recipient. If you
> received this in error, please contact the sender and delete the e-mail
> and its attachments from all computers.
>
> ---------------------------------------------------------------------
> To start a new topic, e-mail: users@tomcat.apache.org
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
>
RE: Running out of memory too easily in Tomcat 6.0.16
Posted by "Caldarale, Charles R" <Ch...@unisys.com>.
> From: Scott Mueller [mailto:scott@gig.io]
> Subject: Running out of memory too easily in Tomcat 6.0.16
>
> I have a very small and simple Spring + Hibernate application
Once you throw Spring and Hibernate into the mix, nothing is simple.
> javax.servlet.ServletException: java.lang.OutOfMemoryError:
> PermGen space
Somewhere, you're hanging onto references to objects or classes from the
prior deployments. ThreadLocal usage is a typical way of doing this, as
are inappropriate references stored in a Session, but there's no limit
to programmer's inventiveness in creating memory leaks.
Read the FAQ:
http://wiki.apache.org/tomcat/FAQ/Memory
Especially this link from there:
http://opensource.atlassian.com/confluence/spring/pages/viewpage.action?
pageId=2669
- Chuck
THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY
MATERIAL and is thus for use only by the intended recipient. If you
received this in error, please contact the sender and delete the e-mail
and its attachments from all computers.
---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
Re: Running out of memory too easily in Tomcat 6.0.16
Posted by antwake <pa...@gmail.com>.
I have the same problem as Scott. And I'm with Netbeans VWP .
It appeared when I moved from Netbeans 6.0 and my own Tomcat instance
(5.5.17) to Netbeans 6.1Beta with embedded Tomcat (6.0.16) so it's more
related to the efficiency of Tomcat than a web app problem.
mgainty wrote:
>
> yes providing configuration files would assist in debugging this scenario
> Thanks
> Martin-
> ----- Original Message -----
> From: "Scott Mueller" <sc...@gig.io>
> To: "Tomcat Users List" <us...@tomcat.apache.org>
> Sent: Wednesday, March 19, 2008 6:19 PM
> Subject: Re: Running out of memory too easily in Tomcat 6.0.16
>
>
>> Hi Martin,
>>
>> I did absolutely zero configuration of tomcat. I use the commons
> dbcp/pool
>> for hibernate, not tomcat's connection pool. And I use acegi for
> security,
>> not tomcat or j2ee's mechanism (though this memory problem was happening
>> before I added acegi). The only thing I touch with tomcat is
>> startup/shutdown.bat and copying my .war to webapps. You want me to send
>> all hibernate and spring configuration files? Some configuration is with
>> annotations..
>>
>> On Wed, Mar 19, 2008 at 4:37 PM, Martin Gainty <mg...@hotmail.com>
> wrote:
>>
>> > Hi Scott--
>> >
>> > tough to say without understanding how you structured your app
>> > pls send all configuration files
>> >
>> > Thanks
>> > Martin
>> > ----- Original Message -----
>> > From: "Scott Mueller" <sc...@gig.io>
>> > To: <us...@tomcat.apache.org>
>> > Sent: Wednesday, March 19, 2008 12:53 PM
>> > Subject: Running out of memory too easily in Tomcat 6.0.16
>> >
>> >
>> > > Hi,
>> > >
>> > > I have a very small and simple Spring + Hibernate application running
> in
>> > > Tomcat 6.0.16. During testing I'm running into many of the following
>> > errors
>> > > with Tomcat:
>> > > javax.servlet.ServletException: java.lang.OutOfMemoryError: PermGen
>> > space
>> > >
>> > > I have to shutdown and startup tomcat every 3rd redeployment. So I
> have
>> > 3
>> > > questions for anybody generous enough to help me:
>> > > Is this normal for a tiny project in the beginning stages of
> development
>> > > (I'm guessing due to Spring & Hibernate)?
>> > > What is the proper way to increase memory allocated to Tomcat?
>> > > If I have 3gbytes of RAM, should I allocate all 3gbytes or possibly
>> > more?
>> > > The idea being memory allocated that I don't have will be swap and
>> not
>> > cause
>> > > tomcat to crash.
>> > >
>> > > Thanks so much for any help.
>> > >
>> >
>> >
>> > ---------------------------------------------------------------------
>> > To start a new topic, e-mail: users@tomcat.apache.org
>> > To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
>> > For additional commands, e-mail: users-help@tomcat.apache.org
>> >
>> >
>>
>
>
> ---------------------------------------------------------------------
> To start a new topic, e-mail: users@tomcat.apache.org
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
>
>
--
View this message in context: http://www.nabble.com/Running-out-of-memory-too-easily-in-Tomcat-6.0.16-tp16161249p16185377.html
Sent from the Tomcat - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
Re: Running out of memory too easily in Tomcat 6.0.16
Posted by Martin Gainty <mg...@hotmail.com>.
yes providing configuration files would assist in debugging this scenario
Thanks
Martin-
----- Original Message -----
From: "Scott Mueller" <sc...@gig.io>
To: "Tomcat Users List" <us...@tomcat.apache.org>
Sent: Wednesday, March 19, 2008 6:19 PM
Subject: Re: Running out of memory too easily in Tomcat 6.0.16
> Hi Martin,
>
> I did absolutely zero configuration of tomcat. I use the commons
dbcp/pool
> for hibernate, not tomcat's connection pool. And I use acegi for
security,
> not tomcat or j2ee's mechanism (though this memory problem was happening
> before I added acegi). The only thing I touch with tomcat is
> startup/shutdown.bat and copying my .war to webapps. You want me to send
> all hibernate and spring configuration files? Some configuration is with
> annotations..
>
> On Wed, Mar 19, 2008 at 4:37 PM, Martin Gainty <mg...@hotmail.com>
wrote:
>
> > Hi Scott--
> >
> > tough to say without understanding how you structured your app
> > pls send all configuration files
> >
> > Thanks
> > Martin
> > ----- Original Message -----
> > From: "Scott Mueller" <sc...@gig.io>
> > To: <us...@tomcat.apache.org>
> > Sent: Wednesday, March 19, 2008 12:53 PM
> > Subject: Running out of memory too easily in Tomcat 6.0.16
> >
> >
> > > Hi,
> > >
> > > I have a very small and simple Spring + Hibernate application running
in
> > > Tomcat 6.0.16. During testing I'm running into many of the following
> > errors
> > > with Tomcat:
> > > javax.servlet.ServletException: java.lang.OutOfMemoryError: PermGen
> > space
> > >
> > > I have to shutdown and startup tomcat every 3rd redeployment. So I
have
> > 3
> > > questions for anybody generous enough to help me:
> > > Is this normal for a tiny project in the beginning stages of
development
> > > (I'm guessing due to Spring & Hibernate)?
> > > What is the proper way to increase memory allocated to Tomcat?
> > > If I have 3gbytes of RAM, should I allocate all 3gbytes or possibly
> > more?
> > > The idea being memory allocated that I don't have will be swap and not
> > cause
> > > tomcat to crash.
> > >
> > > Thanks so much for any help.
> > >
> >
> >
> > ---------------------------------------------------------------------
> > To start a new topic, e-mail: users@tomcat.apache.org
> > To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> > For additional commands, e-mail: users-help@tomcat.apache.org
> >
> >
>
---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
Re: Running out of memory too easily in Tomcat 6.0.16
Posted by Scott Mueller <sc...@gig.io>.
Hi Martin,
I did absolutely zero configuration of tomcat. I use the commons dbcp/pool
for hibernate, not tomcat's connection pool. And I use acegi for security,
not tomcat or j2ee's mechanism (though this memory problem was happening
before I added acegi). The only thing I touch with tomcat is
startup/shutdown.bat and copying my .war to webapps. You want me to send
all hibernate and spring configuration files? Some configuration is with
annotations..
On Wed, Mar 19, 2008 at 4:37 PM, Martin Gainty <mg...@hotmail.com> wrote:
> Hi Scott--
>
> tough to say without understanding how you structured your app
> pls send all configuration files
>
> Thanks
> Martin
> ----- Original Message -----
> From: "Scott Mueller" <sc...@gig.io>
> To: <us...@tomcat.apache.org>
> Sent: Wednesday, March 19, 2008 12:53 PM
> Subject: Running out of memory too easily in Tomcat 6.0.16
>
>
> > Hi,
> >
> > I have a very small and simple Spring + Hibernate application running in
> > Tomcat 6.0.16. During testing I'm running into many of the following
> errors
> > with Tomcat:
> > javax.servlet.ServletException: java.lang.OutOfMemoryError: PermGen
> space
> >
> > I have to shutdown and startup tomcat every 3rd redeployment. So I have
> 3
> > questions for anybody generous enough to help me:
> > Is this normal for a tiny project in the beginning stages of development
> > (I'm guessing due to Spring & Hibernate)?
> > What is the proper way to increase memory allocated to Tomcat?
> > If I have 3gbytes of RAM, should I allocate all 3gbytes or possibly
> more?
> > The idea being memory allocated that I don't have will be swap and not
> cause
> > tomcat to crash.
> >
> > Thanks so much for any help.
> >
>
>
> ---------------------------------------------------------------------
> To start a new topic, e-mail: users@tomcat.apache.org
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
>
Re: Tomcat hangs on SATA Linux server
Posted by Mark Deneen <md...@gmail.com>.
How much memory is on the server? Your file buffer may be too large and
your disks can not keep up. I think the default is 10% of memory, so if
you can fill that up faster than the disks can write it it will hang
until the buffer is emptied. I doubt you are doing that much file i/o
through a webapp though!
Mark
Rick Fincher wrote:
> Hi All,
>
> We have a web app running on Tomcat that accesses Oracle via JDBC on a
> Linux server (Centos 4.5) . The web app runs fine on one server but
> but locks up or hangs for 20-30 second periods on a Dell sever running
> with SATA storage.
>
> I only mention SATA because that is the only significant difference
> between the two servers.
>
> Anyone have a clue what is causing this?
>
>
> Thanks!
>
> Rick
>
>
>
> ---------------------------------------------------------------------
> To start a new topic, e-mail: users@tomcat.apache.org
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
RE: Tomcat hangs on SATA Linux server
Posted by "Caldarale, Charles R" <Ch...@unisys.com>.
> From: Rick Fincher [mailto:rnf@tbird.com]
> Subject: Tomcat hangs on SATA Linux server
>
> Anyone have a clue what is causing this?
Must be the day for people to leave out most relevant information.
1) What Tomcat level?
2) What JVM version?
3) What Java heap size have you specified?
4) What does JConsole show is going on during the hiccups? (Hangs are
permanent, your situation recovers, so it's not a hang.)
5) What kind of GC activity is going on?
6) Are you experiencing page swapping during the hiccups?
7) What does a thread dump show during the hiccups?
That's just for starters.
- Chuck
THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY
MATERIAL and is thus for use only by the intended recipient. If you
received this in error, please contact the sender and delete the e-mail
and its attachments from all computers.
---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
Re: Tomcat hangs on SATA Linux server
Posted by Sameer Acharya <ac...@yahoo.com>.
Is this just with Tomcat or does it happen with other
apps too ?
Chances are that your device driver may be having
issues and hence slowing down the system in between.
-Sameer
--- Rick Fincher <rn...@tbird.com> wrote:
> Hi All,
>
> We have a web app running on Tomcat that accesses
> Oracle via JDBC on a
> Linux server (Centos 4.5) . The web app runs fine
> on one server but but
> locks up or hangs for 20-30 second periods on a Dell
> sever running with
> SATA storage.
>
> I only mention SATA because that is the only
> significant difference
> between the two servers.
>
> Anyone have a clue what is causing this?
>
>
> Thanks!
>
> Rick
>
>
>
>
---------------------------------------------------------------------
> To start a new topic, e-mail:
> users@tomcat.apache.org
> To unsubscribe, e-mail:
> users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail:
> users-help@tomcat.apache.org
>
>
____________________________________________________________________________________
Looking for last minute shopping deals?
Find them fast with Yahoo! Search. http://tools.search.yahoo.com/newsearch/category.php?category=shopping
---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
Tomcat hangs on SATA Linux server
Posted by Rick Fincher <rn...@tbird.com>.
Hi All,
We have a web app running on Tomcat that accesses Oracle via JDBC on a
Linux server (Centos 4.5) . The web app runs fine on one server but but
locks up or hangs for 20-30 second periods on a Dell sever running with
SATA storage.
I only mention SATA because that is the only significant difference
between the two servers.
Anyone have a clue what is causing this?
Thanks!
Rick
---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
Re: Running out of memory too easily in Tomcat 6.0.16
Posted by Martin Gainty <mg...@hotmail.com>.
Hi Scott--
tough to say without understanding how you structured your app
pls send all configuration files
Thanks
Martin
----- Original Message -----
From: "Scott Mueller" <sc...@gig.io>
To: <us...@tomcat.apache.org>
Sent: Wednesday, March 19, 2008 12:53 PM
Subject: Running out of memory too easily in Tomcat 6.0.16
> Hi,
>
> I have a very small and simple Spring + Hibernate application running in
> Tomcat 6.0.16. During testing I'm running into many of the following
errors
> with Tomcat:
> javax.servlet.ServletException: java.lang.OutOfMemoryError: PermGen space
>
> I have to shutdown and startup tomcat every 3rd redeployment. So I have 3
> questions for anybody generous enough to help me:
> Is this normal for a tiny project in the beginning stages of development
> (I'm guessing due to Spring & Hibernate)?
> What is the proper way to increase memory allocated to Tomcat?
> If I have 3gbytes of RAM, should I allocate all 3gbytes or possibly more?
> The idea being memory allocated that I don't have will be swap and not
cause
> tomcat to crash.
>
> Thanks so much for any help.
>
---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org