TomcatExpert

Out of Memory - Out of swap space

 

Hi,

 

I am having out of memory issues on my web servers. I tried tracking the heap memory but I could not find any pattern on when it goes out of memory. I have seen cases when tomcat goes out of memory when it is using (600MB/1GB). I have attached the Tomcat Log and a Thread Dump that I get when this happens.

 

Could you please help me figuring out this issue. 

 

Thanks a lot.

 

Best,

Sunil

 

 --------------------------------------------------------------------------------

INFO   | jvm 1    | 2011/09/21 11:36:56 | #

INFO   | jvm 1    | 2011/09/21 11:36:56 | # An unexpected error has been detected by Java Runtime Environment:

INFO   | jvm 1    | 2011/09/21 11:36:56 | #

INFO   | jvm 1    | 2011/09/21 11:36:56 | # java.lang.OutOfMemoryError: requested 8192000 bytes for GrET in C:\BUILD_AREA\jdk6_05\hotspot\src\share\vm\utilities\growableArray.cpp. Out of swap space?

INFO   | jvm 1    | 2011/09/21 11:36:56 | #

INFO   | jvm 1    | 2011/09/21 11:36:56 | #  Internal Error (allocation.inline.hpp:42), pid=38068, tid=12884

INFO   | jvm 1    | 2011/09/21 11:36:56 | #  Error: GrET in C:\BUILD_AREA\jdk6_05\hotspot\src\share\vm\utilities\growableArray.cpp

INFO   | jvm 1    | 2011/09/21 11:36:56 | #

INFO   | jvm 1    | 2011/09/21 11:36:56 | # Java VM: Java HotSpot(TM) Client VM (10.0-b19 mixed mode windows-x86)

INFO   | jvm 1    | 2011/09/21 11:36:56 | # An error report file with more information is saved as:

INFO   | jvm 1    | 2011/09/21 11:36:56 | # D:\apache-tomcat-5.5.23-w1a\bin\hs_err_pid38068.log

INFO   | jvm 1    | 2011/09/21 11:36:57 | #

INFO   | jvm 1    | 2011/09/21 11:36:57 | # If you would like to submit a bug report, please visit:

INFO   | jvm 1    | 2011/09/21 11:36:57 | #   http://java.sun.com/webapps/bugreport/crash.jsp

INFO   | jvm 1    | 2011/09/21 11:36:57 | #

INFO   | jvm 1    | 2011/09/21 11:36:57 | Please use CMSClassUnloadingEnabled in place of CMSPermGenSweepingEnabled in the future

INFO   | jvm 1    | 2011/09/21 11:36:57 | java.lang.OutOfMemoryError

ERROR  | wrapper  | 2011/09/21 11:36:57 | JVM exited unexpectedly.

STATUS | wrapper  | 2011/09/21 11:37:02 | Launching a JVM…

 --------------------------------------------------------------------------------

 

I am also attaching a Thread dump created when this happens 

 

 --------------------------------------------------------------------------------

#

# There is insufficient memory for the Java Runtime Environment to continue.

# Native memory allocation (malloc) failed to allocate 32756 bytes for ChunkPool::allocate

# Possible reasons:

#   The system is out of physical RAM or swap space

#   In 32 bit mode, the process size limit was hit

# Possible solutions:

#   Reduce memory load on the system

#   Increase physical memory or swap space

#   Check if swap backing store is full

#   Use 64 bit Java on a 64 bit OS

#   Decrease Java heap size (-Xmx/-Xms)

#   Decrease number of Java threads

#   Decrease Java thread stack sizes (-Xss)

#   Set larger code cache with -XX:ReservedCodeCacheSize=

# This output file may be truncated or incomplete.

#

#  Out of Memory Error (allocation.cpp:211), pid=6928, tid=4368

#

# JRE version: 6.0_25-b06

# Java VM: Java HotSpot(TM) Client VM (20.0-b11 mixed mode windows-x86 )

 

---------------  T H R E A D  ---------------

 

Current thread (0x68538400):  VMThread [stack: 0x68920000,0x68970000] [id=4368]

 

Stack: [0x68920000,0x68970000],  sp=0x6896f914,  free space=318k

Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)

V  [jvm.dll+0x13363a]

V  [jvm.dll+0x12e62c]

V  [jvm.dll+0x53d19]

V  [jvm.dll+0x53f12]

V  [jvm.dll+0x54113]

V  [jvm.dll+0x65bde]

V  [jvm.dll+0x11980e]

V  [jvm.dll+0x11995e]

V  [jvm.dll+0x11b23c]

V  [jvm.dll+0x119675]

V  [jvm.dll+0xf1ff8]

V  [jvm.dll+0xf2211]

V  [jvm.dll+0x11cbce]

V  [jvm.dll+0x11cef0]

V  [jvm.dll+0x11d2f2]

V  [jvm.dll+0x140a8c]

C  [msvcr71.dll+0x9565]

C  [kernel32.dll+0x8f13c]

C  [ntdll.dll+0x7d80d]

C  [ntdll.dll+0x7da1f]

 

VM_Operation (0x7c31dd78): BulkRevokeBias, mode: safepoint, requested by thread 0x6b564000

 

 

---------------  P R O C E S S  ---------------

 

Java Threads: ( => current thread )

  0x6960d800 JavaThread "Thread-132956" daemon [_thread_blocked, id=11140, stack(0x6ab30000,0x6ab80000)]

...

  0x69612400 JavaThread "TP-Processor26" daemon [_thread_blocked, id=10704, stack(0x6b0c0000,0x6b110000)]

  0x69610c00 JavaThread "AWT-Windows" daemon [_thread_in_native, id=21180, stack(0x6c280000,0x6c2d0000)]

  0x69610000 JavaThread "Java2D Disposer" daemon [_thread_blocked, id=20672, stack(0x6c120000,0x6c170000)]

  0x6960ec00 JavaThread "http-8080-Monitor" [_thread_blocked, id=12096, stack(0x6ace0000,0x6ad30000)]

  0x6960e400 JavaThread "http-8080-Processor1" daemon [_thread_in_native, id=12612, stack(0x6ac50000,0x6aca0000)]

  0x6960e000 JavaThread "TP-Monitor" daemon [_thread_blocked, id=8276, stack(0x6abc0000,0x6ac10000)]

  0x6960d400 JavaThread "TP-Processor24" daemon [_thread_in_native, id=9360, stack(0x6aaa0000,0x6aaf0000)]

...

 

 0x695b3800 JavaThread "ContainerBackgroundProcessor[StandardEngine[Catalina]]" daemon [_thread_blocked, id=12148, stack(0x69150000,0x691a0000)]

  0x695b9400 JavaThread "Thread-5" [_thread_blocked, id=20260, stack(0x69010000,0x69060000)]

  0x69521c00 JavaThread "MySQL Statement Cancellation Timer" daemon [_thread_blocked, id=15184, stack(0x69c20000,0x69c70000)]

  0x6950d800 JavaThread "EduNet-Sitemover" [_thread_blocked, id=3948, stack(0x69b90000,0x69be0000)]

  0x694dd800 JavaThread "EduNet-RequestMonitor" [_thread_blocked, id=21064, stack(0x69b00000,0x69b50000)]

  0x694dd400 JavaThread "EduNet-AutoCleaner" [_thread_blocked, id=5104, stack(0x69a70000,0x69ac0000)]

  0x685d1000 JavaThread "WrapperStartStopAppMain" [_thread_in_native, id=13604, stack(0x691e0000,0x69230000)]

  0x0100b400 JavaThread "DestroyJavaVM" [_thread_blocked, id=20856, stack(0x00430000,0x00480000)]

  0x685cd000 JavaThread "Wrapper-Connection" daemon [_thread_in_native, id=21016, stack(0x690c0000,0x69110000)]

  0x6866f800 JavaThread "Wrapper-Control-Event-Monitor" daemon [_thread_blocked, id=21428, stack(0x68f30000,0x68f80000)]

  0x68577800 JavaThread "Low Memory Detector" daemon [_thread_blocked, id=3824, stack(0x68d10000,0x68d60000)]

  0x68573c00 JavaThread "C1 CompilerThread0" daemon [_thread_blocked, id=13888, stack(0x68c80000,0x68cd0000)]

  0x6856b400 JavaThread "Attach Listener" daemon [_thread_blocked, id=14872, stack(0x68bf0000,0x68c40000)]

  0x6856ac00 JavaThread "Signal Dispatcher" daemon [_thread_blocked, id=14476, stack(0x68b60000,0x68bb0000)]

  0x6856a400 JavaThread "Surrogate Locker Thread (Concurrent GC)" daemon [_thread_blocked, id=16440, stack(0x68ad0000,0x68b20000)]

  0x68541800 JavaThread "Finalizer" daemon [_thread_blocked, id=8364, stack(0x68a40000,0x68a90000)]

  0x6853bc00 JavaThread "Reference Handler" daemon [_thread_blocked, id=14216, stack(0x689b0000,0x68a00000)]

 

Other Threads:

=>0x68538400 VMThread [stack: 0x68920000,0x68970000] [id=4368]

  0x68583000 WatcherThread [stack: 0x68da0000,0x68df0000] [id=6292]

 

VM state:at safepoint (normal execution)

 

VM Mutex/Monitor currently owned by a thread:  ([mutex/lock_event])

[0x010098a0] Threads_lock - owner thread: 0x68538400

 

Heap

 par new generation   total 138240K, used 20957K [0x038f0000, 0x0cef0000, 0x0cef0000)

  eden space 122880K,   6% used [0x038f0000, 0x040ef028, 0x0b0f0000)

  from space 15360K,  83% used [0x0bff0000, 0x0cc686f8, 0x0cef0000)

  to   space 15360K,   0% used [0x0b0f0000, 0x0b0f0000, 0x0bff0000)

 concurrent mark-sweep generation total 1075200K, used 205517K [0x0cef0000, 0x4e8f0000, 0x4e8f0000)

 concurrent-mark-sweep perm gen total 58764K, used 36512K [0x4e8f0000, 0x52253000, 0x648f0000)

 

Code Cache  [0x011a0000, 0x01d58000, 0x031a0000)

 total_blobs=3219 nmethods=3003 adapters=151 free_code_cache=21298880 largest_free_block=256

 

VM Arguments:

jvm_args: -Dcatalina.base=.. -Dcatalina.home=.. -Djava.io.tmpdir=../temp -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager -Djava.util.logging.config.file=../conf/logging.properties -Dwrapper.dump.port=7777 -XX:MaxPermSize=352m -XX:+HeapDumpOnOutOfMemoryError -XX:MaxGCMinorPauseMillis=3000 -XX:MaxGCPauseMillis=3000 -XX:+CMSParallelRemarkEnabled -XX:+UseConcMarkSweepGC -XX:+CMSIncrementalMode -XX:+CMSIncrementalPacing -XX:CMSIncrementalDutyCycleMin=0 -XX:CMSIncrementalDutyCycle=10 -XX:+UseParNewGC -XX:+CMSPermGenSweepingEnabled -Djava.security.manager -Djava.security.policy=../conf/catalina.policy -Xms1200m -Xmx1200m -Djava.library.path=../lib -Dwrapper.key=BOKWMhvueEUHP_gd -Dwrapper.port=32000 -Dwrapper.jvm.port.min=31000 -Dwrapper.jvm.port.max=31999 -Dwrapper.pid=13060 -Dwrapper.version=3.2.3 -Dwrapper.native_library=wrapper -Dwrapper.service=TRUE -Dwrapper.cpu.timeout=10 -Dwrapper.jvmid=1 

java_command: org.tanukisoftware.wrapper.WrapperStartStopApp org.apache.catalina.startup.Bootstrap 1 start org.apache.catalina.startup.Bootstrap true 1 stop

Launcher Type: SUN_STANDARD

 

Environment Variables:

JAVA_HOME=C:\Program Files (x86)\Java\jdk1.6.0_25\bin\

PATH=C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files (x86)\Java\jdk1.6.0_25\bin\;C:\Program Files (x86)\Dell\SysMgt\oma\bin;C:\Program Files (x86)\Dell\SysMgt\idrac

USERNAME=SYSTEM

OS=Windows_NT

PROCESSOR_IDENTIFIER=Intel64 Family 6 Model 44 Stepping 2, GenuineIntel

 

 

 

---------------  S Y S T E M  ---------------

 

OS: Windows Server 2008 Build 6002 Service Pack 2

 

CPU:total 16 (4 cores per cpu, 2 threads per core) family 6 model 44 stepping 2, cmov, cx8, fxsr, mmx, sse, sse2, sse3, ssse3, sse4.1, sse4.2, popcnt, ht

 

Memory: 4k page, physical 8374448k(4542456k free), swap 16896412k(13126652k free)

 

vm_info: Java HotSpot(TM) Client VM (20.0-b11) for windows-x86 JRE (1.6.0_25-b06), built on Apr 14 2011 01:04:32 by "java_re" with MS VC++ 7.1 (VS2003)

 

time: Wed Nov 02 13:01:38 2011

elapsed time: 1805 seconds

 

 --------------------------------------------------------------------------------

 

 

 

 

asked by sunilatte

question

This is a regular OutOfMemoryError in the Java Heap, you are receiving the error cause

  • You have set -Xmx too low or
  • You have a memory leak in your application

The reason the JVM crashes, is cause you are using a very old JVM, I suggest you

  1. Upgrade your JVM to the latest 1.6.0 release
  2. Use a 64 bit JVM
  3. Increase -Xmx

If you are still seeing an OutOfMemoryError after that, you probably have a memory leak. For that you can use a profile to analyze your memory usage. I prefer YourKit

answer

answered by fhanik on August 30, 2012 04:10 PM

Filip Hanik is a Senior Software Engineer for the SpringSource Division of VMware, Inc. (NYSE: VMW) and a key participant in the company's Apache Tomcat initiatives. Filip brings 15 years of extensive experience in architecture, design and development of distributed application frameworks and containers and is recognized for his top-quality system development skills and continuous participation of Open Source development projects. Filip is an Apache Software Foundation member and a committer to the Apache Tomcat project where he is a leading authority on Tomcat clustering and a key contributor to the core of the platform. Filip has made contributions to software initiatives for Walmart.com, Sony Music, France Telecom and has held a variety of senior software engineering positions with technology companies in both the United States and Sweden. He received his education at Chalmers University of Technology in Gothenburg, Sweden where he majored in Computer Science and Computer Engineering.

Comments

nice topic

Many people nowadays are facing such problems and so I am grateful to you for the detailed description. I too had this problem until I found this blog. I have gone through the steps and it works properly. https://woodpeckerscrafts.com/toy-parts.html

Even I found some issues with

Even I found some issues with the memory space and it showed out of memory in my web servers. I installed my Tomcat server and it is not working properly. is there any issue with the version? Please provide an immediate solution for this error. mens dress socks fun

Useful info

I think this is a relevant question that most of us have in our mind. I have always memory issues on my web servers but I don’t know how to fix it. Could you please provide some tips to solve it. Hope you will provide a correct answer as soon as possible. dish network channel list

nice topic

I have gone through this article and read the content. I don’t understand it well as I don’t have much knowledge in technical matters. But once I finished the reading I got interested in the topic and wish to know more. free clinic hiv testing

I am incapable to study

I am incapable to study content on the internet very often, but I’m grateful I did nowadays. This is very well crafted and your factors are well-expressed. Please, don’t ever quit composing energy expenditure at rest.

check cashing oceanside

I have enjoyed this great information so much. This was really very interesting and helpful to read. Now follow-up check cashing oceanside Thanks for good work.

sleemalax

Improve performance of your server by identifying its bottlenecks. To improve server performance you can focus on HTTP compression and server-side Olympus Labs and client-side caching. Memory cache, network time-outs, threads, download time and number of http requests are some factors that affect the web server performance. Using server monitoring services, you will know if there is an improvement in the performance of the website.

sleemalax

I have perused a couple of the articles on your site now, and I truly like your style of blogging. I added it to my top choices online journal website list and will be inquiring soon. If it's not too much trouble look at my site also and let me realize what you think. www.emergencytreeremovalatlanta.net

the most amazing coolmath

the most amazing coolmath games 2017

Music Downloader

liqua

Toko Obat Herbal veherba menjual produk alamiah berkualitas yang bertujuan untuk membantu memperbaiki mutu kesehatan pribadi Anda. Toko Online Kami merupakan toko grosir obat-obatan herbal terbesar di Indonesia.

Jus Amazon Plus berbentuk jus yang berkomposisikan buah-buahan bermutu dari seluruh pelosok dunia.
Salah satunya buah-buahan dari pedalaman Hutan Amazon, Amerika Selatan yang dipadukan dengan manggis, queen of fruit asal Indonesia yang juga memiliki kandungan super antioksidan tinggi, juga ada zaitun yang kaya akan zat Hydroxytyrosol.

K-Muricata adalah obat herbal dalam bentuk teh pertama di dunia yang memadukan dua manfaat tanaman herbal yaitu, daun sirsak dan keladi tikus.
Pada daun sirsak terdapat senyawa ajaib yang disebut Acetogenin yang mampu menumpas sel kanker 10.000 kali lebih kuat dibanding Adriamycin (obat kemoterapi).

Nice Article

This is a common issue faced by users of Tomcat and people think this is a big drawback even though the software is exceptionally good at performance. Minor tweaks could fix this shortcoming but nobody is interested in following it.
it services
companies

thesis writing services

I have been searching for a fixed solution for this issue and I think this post will help me to solve the same issue without much hard. I hope to see more such helpful posts on this blog. Keep sharing more on this blog! buy essay online

This post is very helpful to

This post is very helpful to know the reason for showing out of memory or out of swap space. I think these issues can be solved by following the given instructions. I am expecting more posts on this blog. Thank you! Chinese with ease

BlackMen

This is such a great resource that you are providing and you give it away for free. http://daftarsbobett.com

Car WHAT is alone proper for

Car

WHAT is alone proper for the present: namely, the collection of material, the comprehensive survey and classification of an immense domain of delicate sentiments rolex sea dweller of worth, and distinctions of worth, which live, grow, propagate, and perish—and perhaps attempts to give a clear idea of the recurring and more common forms of these living crystallizations—as preparation for a THEORY OF TYPES of morality. To be sure, people have not hitherto been so modest.

All the philosophers, with a pedantic and ridiculous seriousness, demanded of themselves something very tag Heuer Link much higher, more pretentious, and ceremonious, when they concerned themselves with morality as a science: they wanted to GIVE A BASIC to morality—and every philosopher hitherto has believed that he has given it a basis; morality itself, however, has been regarded as something "given." How far from their awkward pride was the seemingly insignificant submariner Rolex problem—left in dust and decay—of a description of forms of morality, notwithstanding that the finest hands and senses could hardly be fine enough for it!

It was precisely owing to moral philosophers' knowing the moral facts imperfectly, in an arbitrary epitome, or an accidental abridgement—perhaps as the morality of their environment, their position, their church, their Zeitgeist, their climate and zone—it was precisely because they were badly instructed with regard to nations, eras, and past ages, and were by no means eager to know about these matters, that they did not even come in sight of the real problems of morals—problems which only disclose themselves by a comparison of MANY kinds of morality. In every "Science of Morals" hitherto, strange as it designer devi kroell replica handbags may sound, the problem of morality itself has been OMITTED: there has been no suspicion that there was anything problematic there! That which philosophers called "giving a basis to morality," and endeavoured to realize.

When seen in a right light, proved merely a learned form of good FAITH in prevailing morality, a new means of its EXPRESSION, consequently just a matter-of-fact within the sphere of a definite morality, yea, in its ultimate motive, a sort of rolex daytona denial that it is LAWFUL for this morality to be called in question—and in any case the reverse of the testing, analyzing, doubting, and vivisecting of this very faith. Hear, for instance, with what innocence—almost worthy of honour—Schopenhauer represents his own task.

We all know had an ability to

We all know had an ability to write. But we can't. To study and get some Essay Writing Tips. Then you write it yourself.

Thanks Guys

This is one of the best sites I ever came across. If you have a problem about Tomcat, you are free to post here. Tomcatexperts.com have the best experts to help you out. I had a few issues with tomcat and I found my answers here.
cheap wedding planners

Social CRM Strategy

You make so many great points here that I read your article a couple of times. Your views are in accordance with my own for the most part. This is great content for your readers. Social CRM Strategy

Re: Apache Tomcat

Memory problem is the main thing we all have to face and such things are discussed here. The Tomcat series things and problems are easily solvable as the site shares such necessary articles. Thanks for the same and keep sharing.cox internet plans

Thank a lot my dear friend

Thank a lot my dear friend for sharing such an informative post here. Actually this post helped me to learn something different in the case of out of memory issue. Keep updating more posts here!

re: Out of Memory

When handling with big files there is surely a need for big memory capacity. I never faced such issues but there are surely chances of such problems in future. So this article found to be great info to me and I have learned many things from this blog.
video production makeup artist

I am a regular user of Apache

I am a regular user of Apache tomcat, I prefer the tomcat than any other server. It has a lot of advantages when comparing to other server. You had shared a valuable information about Tomcat and I will bookmark your page for further references. directv

I think this issue is one of

I think this issue is one of the common issues among the users. Most of the people are reporting this problem. This post helps us to solve the problem easily. Keep sharing more such useful tips on this blog! sell my miles

I also had out of memory

I also had out of memory issue and the provided article helps me a lot to overcome this problem. The instructions by Filip Hanik are valuable, and so many tips regarding software are also provided here. I think this is the best site to clear all my software doubts. directv choice package

however in the event that

however in the event that there is no answer present it will require a man that is sufficiently commonplace to rectify any wrong replies.play here

On the off chance that the

On the off chance that the answers are available they might be utilized without the assistance of somebody who knows the right replies,game homepage

Some blaze cards have the

Some blaze cards have the inquiry on one side and the answer on the other. Different cards may just have the issue and have a clear side.play game here

Actually I have been also

Actually I have been also facing this issue for few days. I have searched a lot to find a better solution and I couldn’t find anything valid. But now I think this article will help me to solve my current issue. Thank you so much for sharing this post here.

Indian army recruitment

Romeo Rabby

Everyone like entertainment. Film Songs PK is a new site to entertain those people who like music beside your site articles.

niceessays

One should never forget that nothing comes without persevering and devotion with consideration towards that assignment. niceessays is certainly a period taken yet helpful approach to get best spot among the family and companions.

I have been searching for a

I have been searching for a fixed solution for this issue and I think this post will help me to solve the same issue without much hard. I hope to see more such helpful posts on this blog. Keep sharing more on this blog! catalina island hotels

GAME HACK

top eleven hack Great info! I recently came across your blog and have been reading along. I thought I would leave my first comment. I don’t know what to say except that I have. clash of clans triche

Post new comment

CAPTCHA
This question is for testing whether you are a human visitor and to prevent automated spam submissions.