Thanks Chris! So JAVA_OPTS is where these kinds of parameters go. On Wed, Mar 19, 2008 at 12:00 PM, Chris Hut <[EMAIL PROTECTED]> 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:[EMAIL PROTECTED] > 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 < > [EMAIL PROTECTED]> wrote: > > > > From: Scott Mueller [mailto:[EMAIL PROTECTED] > > > 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: [EMAIL PROTECTED] > > For additional commands, e-mail: [EMAIL PROTECTED] > > > > > > --------------------------------------------------------------------- > To start a new topic, e-mail: users@tomcat.apache.org > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > >