permgen

PermGen Out of Memory reasons

早过忘川 提交于 2019-11-29 23:22:16
I constantly detect OOM in PermGen for my environment: java 6 jboss-4.2.3 Not a big web-application I know about String.intern() problem - but I don't have enough valuable usage of it. Increasing of MaxPermGen size didn't take a force (from 128 Mb to 256 Mb). What other reasons could invoke OOM for PermGen? What scenario of investigation is the best in such situation (strategy, tools and etc.)? Thanks for any help See this note Put JDBC driver in common/lib (as tomcat documentation says) and not in WEB-INF/lib Don't put commons-logging into WEB-INF/lib since tomcat already bootstraps it new

What free JVM implementation has the best PermGen handling?

心不动则不痛 提交于 2019-11-29 19:52:49
问题 I'm running Tomcat6 in Sun's JRE6 and every couple deploys I get OutOfMemoryException: PermGen. I've done the Googling of PermGen solutions and tried many fixes. None work. I read a lot of good things about Oracle's JRockit and how its PermGen allocation can be gigs in size (compare to Sun's 128M) and while it doesn't solve the problem, it would allow me to redeploy 100 times between PermGen exceptions compared to 2 times now. The problem with JRockit is to use it in production you need to

Are Inner Classes lightweight?

主宰稳场 提交于 2019-11-29 19:16:55
问题 Are inner classes more lightweight than normal classes, or in the end java compiles inner classes just like normal classes? I know classes in java are not all very lightweight themselves, and they occupy part of the permgen memory, so I'd like to know if it's best to use closure-like functions as inner classes, or if standard classes would also do fine? 回答1: Inner classes and anonymous inner classes both compile down to .class files. For example: class Outer { class Inner { } Object function(

Is java PermGen space part of the total VM memory?

 ̄綄美尐妖づ 提交于 2019-11-29 17:44:35
问题 Assuming I start my java VM with the following parameters: -Xms1024m -Xmx1024m -XX:PermSize=512m -XX:MaxPermSize=512m Do the 512m PermGen space add to the 1024m memory or are they part of it ? Or in other words, do I have a total memory consumption of 1536m or of 1024m? In the latter case, does that mean that the application has only 512m for purposes other than PermGen space? Please let me know in case this question reveals a lack of understanding PermGen space. ;-) 回答1: The -Xms and -Xmx

Real Life, Practical Example of Using String.intern() in Java?

爷,独闯天下 提交于 2019-11-29 16:21:59
问题 I've seen many primitive examples describing how String intern()'ing works, but I have yet to see a real-life use-case that would benefit from it. The only situation that I can dream up is having a web service that receives a considerable amount of requests, each being very similar in nature due to a rigid schema. By intern()'ing the request field names in this case, memory consumption can be significantly reduced. Can anyone provide an example of using intern() in a production environment

BIRT报表使用中碰到的两个问题

自闭症网瘾萝莉.ら 提交于 2019-11-29 14:14:08
最近使用Eclipse官方的报表工具开发,好歹完成了任务,期间真是 各种怒!下面稍微汇总下 BIRT报表使用出现的问题: 1. OutOfMemoryError: PermGen space : 这是个奇葩的异常,用Eclipse+Tomcat 启动就会抛出这个异常,OK,这个问题对于开发者来说是很容易解决的,改下Tomcat配置,发现不行!Eclipse运行内存加大,不行!JDK缓存配置加大,不行!各种不行,哥完全误解了,后来实在无聊的时候,抛开Eclipse,直接运行Tomcat/bin/startup.bat,奇葩,可以了!好吧,至今没找到原因!(求解释!) 另:其实这个BUG,在03年就有人向SUN公司提了,所以找到了这句好玩的话: OutOfMemoryError: PermGen space----A bug this critical is open since 2003? Absolutely shameful. 2. 版本不匹配报错!此种错误一般是因为你的Eclipse插件版本和项目使用的BIRT核心包版本不匹配造成的! 如果总是报你的相关目录底下没有找到报表文件,那么你可以象这样尝试解决: a. 修改如下两行:(下面代码仅做参考) <report xmlns="http://www.eclipse.org/birt/2005/design" version="3

Can we avoid interning of strings in java?

本小妞迷上赌 提交于 2019-11-29 12:00:20
Can we completely disable interning of strings. It might not be really helpful, but just a thought. I can think atleast one point where it could be helpful i.e. during jvm tuning, controlling the size of the perm gen. For e.g. if I give out an OSGI framework and anyone can add any number of bundles of their own and each bundles string interning can completely screw up my tuning parameters. (Ofcourse I know that we should do tuning on a given fixed distro, but still...) Any thoughts!! Permgen size/usage isn't an issue with modern JVMs. Interned strings are made available to the garbage

内存溢出之PermGen OOM深入分析

不羁的心 提交于 2019-11-29 08:19:14
现在,网上关于讨论PermGen OOM的资料很多,但是深入分析PermGen区域内存溢出原因的资料很少。本篇文章尝试全面分析一下PermGen OOM的原因,其中涉及到了Java虚拟机运行时数据区、类型装载、类型卸载等,测试代码涉及到了JMX协议。相关前提知识如下: 1、Java类加载的基本原理 2、Java类型卸载相关的知识, http://www.blogjava.net/zhuxing/archive/2008/07/24/217285.html 3、简要了解JMX协议,有关JMX协议可以参加sun公司发布的技术规范,对JMX协议做一定的了解对理解Java性能监控和调优功能的实现原理有很大帮助。 【虚拟机运行时数据区介绍】 本部分将对Java虚拟机运行时数据区做一个简单的介绍,着重说明PermGen区域(永久存储区)存放的内容,并对运行时数据区的访问方式做一个归纳说明,为后面深入分析类型卸载和PermGen OOM做铺垫。为了更具有通用性,本部分将更多关注虚拟机协议本身,可能和具体的虚拟机实现有少许的出入。 【运行时数据区分类】 Java虚拟机的运行时数据区一般分类如下(不一定是物理划分): 堆:主要存放对象实例,线程共享 栈:主要存储特定线程的方法调用状态,线程独占 本地方法栈:存储本地方法的调用状态,线程独占 PC寄存器:学过操作系统课程的都知道,线程独占 方法区

Interned strings not in permgen?

╄→尐↘猪︶ㄣ 提交于 2019-11-29 05:46:11
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.25MB) MaxNewSize = 17592186044415 MB OldSize = 5439488 (5.1875MB) NewRatio = 2 SurvivorRatio = 8

java.lang.OutOfMemoryError: PermGen space

╄→尐↘猪︶ㄣ 提交于 2019-11-28 23:35:43
i'm getting the following error "http-9000-5" java.lang.OutOfMemoryError: PermGen space org.apache.catalina.core.ApplicationDispatcher invoke SEVERE: Servlet.service() for servlet jsp threw exception java.lang.OutOfMemoryError: PermGen space. My application using axis2.I increased the heap size 1024mb.But its not working.What would be the problem.Solution please If you're using Tomcat as a Server of Eclipse, go to Server view, then double click on Tomcat, then "Open Launch Configuration", go to Arguments tab, and after setting -Dcatalina.base="" put this -Xms256m -Xmx512m -XX:MaxPermSize=512m