tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From André Warnier ...@ice-sa.com>
Subject Re: Exception in thread ""http-bio-8080"-exec-9" java.lang.OutOfMemoryError: Java heap space
Date Mon, 30 May 2011 16:24:11 GMT
By the way, in addition to the details below, you may want to also indicate with what Heap

size you are running Tomcat.  I suppose that the IBM Heap analyser you are using would 
tell you that.  Otherwise, if you are running Tomcat as a Windows Service, use the GUI 
application (tomcat7w.exe) to examine the Java JVM options tab.

Note also that running out of Heap space does not necessarily mean that your classes have

leaks.  It can also mean that they are just using memory to a point where your allocated 
Heap space is simply not sufficient.

Starting Tomcat with a Heap of 64M and starting 1000 request threads simultaneously would

do it nicely also.

Looking at the stack trace below, I find it unlikely that the code itself in
org.apache.tomcat.util.http.FastHttpDateFormat.getCurrentDate
, by itself, would use up the Heap. However, if by the time it is called, the Heap is 
already 99% full, it just might.



André Warnier wrote:
> Well maybe then you should have posted that stack trace and the comments 
> below to the list, and maybe someone would then have taken a closer look.
> 
> I apologise (a little bit) for my original answer, but you must admit 
> that with the information you posted before, it was hard to make the 
> difference between that, and someone posting : "Tomcat doesn't work. Can 
> you help ?"
> 
> 
> sunil.shevante@wipro.com wrote:
>> Hi Andre,
>>
>> I am not kidding.
>>
>> My application has only 8 to 10 classes. I checked the heap using IBM 
>> heap analyser and my objects are not leaking memory.
>>
>> I am guessing that this is a bug in tomcat 7. Let me know in case you 
>> can make any sense out of the trace.
>>
>> =======================================================================================

>>
>> Exception in thread ""http-bio-8080"-exec-12" 
>> java.lang.OutOfMemoryError: Java heap space
>>         at java.util.LinkedHashMap.createEntry(Unknown Source)
>>         at java.util.LinkedHashMap.addEntry(Unknown Source)
>>         at java.util.HashMap.put(Unknown Source)
>>         at 
>> sun.util.resources.OpenListResourceBundle.loadLookup(Unknown Source)
>>         at 
>> sun.util.resources.OpenListResourceBundle.loadLookupTablesIfNecessary(Unknown 
>> Source)
>>         at 
>> sun.util.resources.OpenListResourceBundle.handleGetObject(Unknown Source)
>>         at 
>> sun.util.resources.TimeZoneNamesBundle.handleGetObject(Unknown Source)
>>         at java.util.ResourceBundle.getObject(Unknown Source)
>>         at java.util.ResourceBundle.getObject(Unknown Source)
>>         at java.util.ResourceBundle.getStringArray(Unknown Source)
>>         at sun.util.TimeZoneNameUtility.retrieveDisplayNames(Unknown 
>> Source)
>>         at sun.util.TimeZoneNameUtility.retrieveDisplayNames(Unknown 
>> Source)
>>         at java.util.TimeZone.getDisplayNames(Unknown Source)
>>         at java.util.TimeZone.getDisplayName(Unknown Source)
>>         at java.text.SimpleDateFormat.subFormat(Unknown Source)
>>         at java.text.SimpleDateFormat.format(Unknown Source)
>>         at java.text.SimpleDateFormat.format(Unknown Source)
>>         at java.text.DateFormat.format(Unknown Source)
>>         at 
>> org.apache.tomcat.util.http.FastHttpDateFormat.getCurrentDate(FastHttpDateFormat.java:115)

>>
>>         at 
>> org.apache.coyote.http11.AbstractHttp11Processor.prepareResponse(AbstractHttp11Processor.java:926)

>>
>>         at 
>> org.apache.coyote.http11.AbstractHttp11Processor.action(AbstractHttp11Processor.java:739)

>>
>>         at org.apache.coyote.Response.action(Response.java:170)
>>         at org.apache.coyote.Response.sendHeaders(Response.java:350)
>>         at 
>> org.apache.catalina.connector.OutputBuffer.doFlush(OutputBuffer.java:308)
>>         at 
>> org.apache.catalina.connector.OutputBuffer.close(OutputBuffer.java:275)
>>         at 
>> org.apache.catalina.connector.Response.finishResponse(Response.java:501)
>>         at 
>> org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:409) 
>>
>>         at 
>> org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:243) 
>>
>>         at 
>> org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:188)

>>
>>         at 
>> org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:166)

>>
>>         at 
>> org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:288)

>>
>>         at 
>> java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)
>> Exception in thread 
>> "ContainerBackgroundProcessor[StandardEngine[Catalina]]" 
>> java.lang.OutOfMemoryError: Java heap space
>>         at java.lang.reflect.Array.newArray(Native Method)
>>         at java.lang.reflect.Array.newInstance(Unknown Source)
>>         at java.util.AbstractCollection.toArray(Unknown Source)
>>         at 
>> org.apache.catalina.session.ManagerBase.findSessions(ManagerBase.java:705) 
>>
>>         at 
>> org.apache.catalina.session.ManagerBase.processExpires(ManagerBase.java:527) 
>>
>>         at 
>> org.apache.catalina.session.ManagerBase.backgroundProcess(ManagerBase.java:518) 
>>
>>         at 
>> org.apache.catalina.core.ContainerBase.backgroundProcess(ContainerBase.java:1214)

>>
>>         at 
>> org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1393)

>>
>>         at 
>> org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1403)

>>
>>         at 
>> org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1403)

>>
>>         at 
>> org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.run(ContainerBase.java:1382)

>>
>>         at java.lang.Thread.run(Unknown Source)
>> =======================================================================================

>>
>>
>> Thanks,
>> Sunil.
>>
>> -----Original Message-----
>> From: André Warnier [mailto:aw@ice-sa.com] Sent: Monday, May 30, 2011 
>> 7:25 PM
>> To: Tomcat Users List
>> Subject: Re: Exception in thread ""http-bio-8080"-exec-9" 
>> java.lang.OutOfMemoryError: Java heap space
>>
>> You are kidding us, right ?
>>
>> But just in case you are not, what is the part which you do not 
>> understand in
>>
>>   "java.lang.OutOfMemoryError: Java heap space".
>>
>> ?
>>
>> http://lmgtfy.com/?q=java.lang.OutOfMemoryError:%20Java%20heap%20space
>>
>> sunil.shevante@wipro.com wrote:
>>> Hi,
>>>
>>>  
>>>
>>> I am getting an error as follows
>>>
>>>  
>>>
>>> "Exception in thread ""http-bio-8080"-exec-9"
>>> java.lang.OutOfMemoryError: Java heap space".
>>>
>>>  
>>>
>>> I am running my jsp application on a windows machine with Tomcat 7.0.8
>>>
>>>  
>>>
>>> Any pointers?
>>>
>>>  
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
>> For additional commands, e-mail: users-help@tomcat.apache.org
>>
>>
>> Please do not print this email unless it is absolutely necessary.
>> The information contained in this electronic message and any 
>> attachments to this message are intended for the exclusive use of the 
>> addressee(s) and may contain proprietary, confidential or privileged 
>> information. If you are not the intended recipient, you should not 
>> disseminate, distribute or copy this e-mail. Please notify the sender 
>> immediately and destroy all copies of this message and any attachments.
>> WARNING: Computer viruses can be transmitted via email. The recipient 
>> should check this email and any attachments for the presence of 
>> viruses. The company accepts no liability for any damage caused by any 
>> virus transmitted by this email.
>> www.wipro.com
>>
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
> 
> 


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


Mime
View raw message