On 21/05/2010 13:25, kent.anders...@tieto.com wrote:
> Hi,
> 
> This is what jmap -heap <pid> gives:
> 
>  using thread-local object allocation.
> Mark Sweep Compact GC
> 
> Heap Configuration:
>    MinHeapFreeRatio = 40
>    MaxHeapFreeRatio = 70
>    MaxHeapSize      = 134217728 (128.0MB)
>    NewSize          = 2228224 (2.125MB)
>    MaxNewSize       = 4294901760 (4095.9375MB)
>    OldSize          = 4194304 (4.0MB)
>    NewRatio         = 8
>    SurvivorRatio    = 8
>    PermSize         = 12582912 (12.0MB)
>    MaxPermSize      = 67108864 (64.0MB)
> 
> Heap Usage:
> New Generation (Eden + 1 Survivor Space):
>    capacity = 6160384 (5.875MB)
>    used     = 1667072 (1.58984375MB)
>    free     = 4493312 (4.28515625MB)
>    27.06117021276596% used
> 
> Eden Space:
>    capacity = 5505024 (5.25MB)
>    used     = 1667072 (1.58984375MB)
>    free     = 3837952 (3.66015625MB)
>    30.282738095238095% used
> From Space:
>    capacity = 655360 (0.625MB)
>    used     = 0 (0.0MB)
>    free     = 655360 (0.625MB)
>    0.0% used
> To Space:
>    capacity = 655360 (0.625MB)
>    used     = 0 (0.0MB)
>    free     = 655360 (0.625MB)
>    0.0% used
> tenured generation:
>    capacity = 54312960 (51.796875MB)
>    used     = 32587664 (31.078018188476562MB)
>    free     = 21725296 (20.718856811523438MB)
>    59.99979378770739% used
> Perm Generation:
>    capacity = 12582912 (12.0MB)
>    used     = 10470144 (9.985107421875MB)
>    free     = 2112768 (2.014892578125MB)
>    83.209228515625% used

Do you have the -Xms flag set to the same value as -Xmx?  It's usually
advised hereabouts to set them to the same value, so the JVM doesn't
have to expend time increasing the heap size.


If your app is experiencing more requests then you may need to allocate
more memory to the heap.  The amount you'll need is entirely specific to
your application.

Assuming you've got actual RAM spare, (if you haven't you'll use swap
and your performance will suffer horribly), you can try increasing the
amount by increments (of say 32Mb).


p

> -----Original Message-----
> From: Pid [mailto:p...@pidster.com] 
> Sent: den 21 maj 2010 14:20
> To: Tomcat Users List
> Subject: Re: Tomcat 6.0.20 is running out of memory
> 
> On 21/05/2010 12:57, kent.anders...@tieto.com wrote:
>> Hi,
>>
>> We are running Jakarta Tomcat Servlet/JSP Engine 6.0.20 on Solaris 2.10.
>> We have -Xmx128M, is that to small?
> 
> Maybe.  :)
> 
> What did the jmap -heap command produce?
> 
> 
> p
> 
> 
>> Best Regards
>> /Kent
>>
>> -----Original Message-----
>> From: Pid [mailto:p...@pidster.com]
>> Sent: den 21 maj 2010 13:20
>> To: Tomcat Users List
>> Subject: Re: Tomcat 6.0.20 is running out of memory
>>
>> On 21/05/2010 11:57, kent.anders...@tieto.com wrote:
>>> Hi,
>>>
>>> The Tomcat webserver 6.0.20 we are using has run out of memory.
>>> Got the following message in the Catalina.out file:
>>> less /opt/jakarta/tomcat/logs/catalina.out
>>> ...
>>> java.lang.OutOfMemoryError: Java heap space
>>>         at java.util.Properties$LineReader.<init>(Properties.java:389)
>>>         at java.util.Properties.load(Properties.java:325)
>>>         at java.util.PropertyResourceBundle.<init>
>>> (PropertyResourceBundle.java:111)
>>>         at 
>>> java.util.ResourceBundle$Control.newBundle(ResourceBundle.java:2428)
>>>         at java.util.ResourceBundle.loadBundle(ResourceBundle.java:1406)
>>>         at java.util.ResourceBundle.findBundle(ResourceBundle.java:1365)
>>>         at java.util.ResourceBundle.findBundle(ResourceBundle.java:1292)
>>>         at java.util.ResourceBundle.getBundleImpl(ResourceBundle.java:1234)
>>>         at java.util.ResourceBundle.getBundle(ResourceBundle.java:715)
>>>         at org.apache.jasper.compiler.Localizer.<clinit>(Localizer.java:36)
>>>         at org.apache.jasper.runtime.PageContextImpl.release
>>> (PageContextImpl.java:191)
>>>         at
>>> org.apache.jasper.runtime.JspFactoryImpl.internalReleasePageContext
>>> (JspFactoryImpl.java:118)
>>>         at 
>>> org.apache.jasper.runtime.JspFactoryImpl.releasePageContext
>>> (JspFactoryImpl.java:77)
>>>         at org.apache.jsp.contents_jsp._jspService(contents_jsp.java:174)
>>>         at 
>>> org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
>>>         at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
>>>         at org.apache.jasper.servlet.JspServletWrapper.service
>>> (JspServletWrapper.java:374)
>>>         at org.apache.jasper.servlet.JspServlet.serviceJspFile
>>> (JspServlet.java:342)
>>>         at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:267)
>>>         at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
>>>         at
>>> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter
>>> (ApplicationFilterChain.java:290)
>>>         at org.apache.catalina.core.ApplicationFilterChain.doFilter
>>> (ApplicationFilterChain.java:206)
>>>         at org.apache.catalina.core.ApplicationDispatcher.invoke
>>> (ApplicationDispatcher.java:646)
>>>         at org.apache.catalina.core.ApplicationDispatcher.doInclude
>>> (ApplicationDispatcher.java:551)
>>>         at org.apache.catalina.core.ApplicationDispatcher.include
>>> (ApplicationDispatcher.java:488)
>>>         at org.apache.jasper.runtime.JspRuntimeLibrary.include
>>> (JspRuntimeLibrary.java:968)
>>>         at org.apache.jsp.mainpage_jsp._jspService(mainpage_jsp.java:109)
>>>         at 
>>> org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
>>>         at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
>>>         at org.apache.jasper.servlet.JspServletWrapper.service
>>> (JspServletWrapper.java:374)
>>>         at org.apache.jasper.servlet.JspServlet.serviceJspFile
>>> (JspServlet.java:342)
>>>         at
>>> org.apache.jasper.servlet.JspServlet.service(JspServlet.java:267)
>>> ERROR:  'Java heap space'
>>> Does anyone have any idea how to prevent this, or why this is happening?
>>
>> Your application has used all the memory it has allocated, prevent the error 
>> by allocating more memory, unless your application has a memory leak - in 
>> which case, find the leak and fix it.
>>
>> You're on a linux variant presumably?  Please state your exact JVM version, 
>> & OS info.  In this case the amount of hardware RAM available would be 
>> useful too.
>>
>> Do you have any memory settings in your JAVA_OPTS or CATALINA_OPTS?
>> (If you're not sure, they look like "-Xmx1024M" for example.)
>>
>> Execute the following command to find out what the heap is using:
>>
>>  jmap -heap <pid>
>>
>>
>> p
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
> 
> 


Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to