permgen

Tomcat thread dump

好久不见. 提交于 2019-12-20 11:35:42
问题 Is there away to take a thread dump from Tomcat. I want to monitor the running threads on Tomcat at a certain time. Note: I was doing that on Web logic but i don't know how it cab be done on Tomcat. 回答1: If you use Linux, you can send a kill -3 [pid of your tomcat] and it will dump all current threads in the catalina.out. 回答2: There is a simple way to monitor tomcat threads and do a dump. Start tomcat with the folowing java options : -Dcom.sun.management.jmxremote.port=<some free port> -Dcom

Tomcat thread dump

醉酒当歌 提交于 2019-12-20 11:35:27
问题 Is there away to take a thread dump from Tomcat. I want to monitor the running threads on Tomcat at a certain time. Note: I was doing that on Web logic but i don't know how it cab be done on Tomcat. 回答1: If you use Linux, you can send a kill -3 [pid of your tomcat] and it will dump all current threads in the catalina.out. 回答2: There is a simple way to monitor tomcat threads and do a dump. Start tomcat with the folowing java options : -Dcom.sun.management.jmxremote.port=<some free port> -Dcom

What is Klass & KlassKlass

浪子不回头ぞ 提交于 2019-12-20 08:59:43
问题 What is Klass & KlassKlass in JVM Hotspot Implementation? As far as I understood from the article Presenting the Perm Generation, Klass is the internal representation of a Java class (let's say A ) & it will hold the basic information about the structure of the class including the bytecode. It will be stored as an object itself. Every object of the class A will have a pointer to the internal representation Klass present in PermGen KlassKlass is the internal representation of the Klass class

Interned strings not in permgen?

隐身守侯 提交于 2019-12-18 04:34:08
问题 I've run the jmap -heap command on our running Java application and here's what I got: C:\Program Files\Java\jdk1.7.0_05\bin>jmap -heap 2384 Attaching to process ID 2384, please wait... Debugger attached successfully. Server compiler detected. JVM version is 23.1-b03 using parallel threads in the new generation. using thread-local object allocation. Concurrent Mark-Sweep GC Heap Configuration: MinHeapFreeRatio = 40 MaxHeapFreeRatio = 70 MaxHeapSize = 1073741824 (1024.0MB) NewSize = 1310720 (1

what to do with tomcat PermGen space

跟風遠走 提交于 2019-12-17 17:32:32
问题 BACKGROUND : I have a web Project which uses JSP. The IDE is Eclipse. The configuration of tomcat is: Automatically publish when resources change and publishing interval is "1 second". A property file in the classes folder which used to save some settings.It also can be dynamically modified by the servlet. The modify operation is trigerred by the save button in the JSP. PROBLEM : After several save operation, Tomcat come with java.lang.OutOfMemoryError: PermGen space . LOG MESSAGE java.lang

How do I properly set the permgen size?

£可爱£侵袭症+ 提交于 2019-12-17 17:29:07
问题 I have this VM with tomcat, java, and grails in it. I've been getting permgen errors so I looked around and found the solution: set JAVA_OPTS="-Xms256m -Xmx1024m -XX:PermSize=512m -XX:MaxPermSize=512m" I use SSH to access the vm and type the arguments above. I suppose that would fix the problem. Thing is, I wanted to make sure that I did it correctly. So I searched again on how I could check the current permSize and this is the solution I got: jinfo -flag MaxPermSize 6444 6444 is the pid, and

Do I have a JAXB classloader leak

只谈情不闲聊 提交于 2019-12-17 16:49:05
问题 I have an application deployed on Glassfish. Over time the number of loaded classes climbs into the millions and my permgen seems to rise. To help troubleshoot I added the following to my jvm arguments. -XX:+PrintGCDetails -XX:+TraceClassUnloading -XX:+TraceClassLoading Now when watching the output, I see the same classes being loaded over and over again. Basically every time a web service is called and JAXB is used to process the xml. [Loaded com.strikeiron.ZIPCodesInRadius$JaxbAccessorF

What is the difference between PermGen and Metaspace?

ⅰ亾dé卋堺 提交于 2019-12-17 06:23:19
问题 Until Java 7 there was an area in JVM memory called PermGen , where JVM used to keep its classes. In Java 8 it was removed and replaced by area called Metaspace . What are the most important differences between PermGen and Metaspace? The only difference I know is that java.lang.OutOfMemoryError: PermGen space can no longer be thrown and the VM parameter MaxPermSize is ignored. 回答1: The main difference from a user perspective - which I think the previous answer does not stress enough - is that

ThreadLocal & Memory Leak

谁说胖子不能爱 提交于 2019-12-17 04:42:02
问题 It is mentioned at multiple posts: improper use of ThreadLocal causes Memory Leak. I am struggling to understand how Memory Leak would happen using ThreadLocal . The only scenario I have figured out it as below: A web-server maintains a pool of Threads (e.g. for servlets). Those threads can create memory leak if the variables in ThreadLocal are not removed because Threads do not die. This scenario does not mention "Perm Space" memory leak. Is that the only (major) use case of memory leak? 回答1

ThreadLocal & Memory Leak

陌路散爱 提交于 2019-12-17 04:40:27
问题 It is mentioned at multiple posts: improper use of ThreadLocal causes Memory Leak. I am struggling to understand how Memory Leak would happen using ThreadLocal . The only scenario I have figured out it as below: A web-server maintains a pool of Threads (e.g. for servlets). Those threads can create memory leak if the variables in ThreadLocal are not removed because Threads do not die. This scenario does not mention "Perm Space" memory leak. Is that the only (major) use case of memory leak? 回答1