Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 288d62c

Browse filesBrowse files
committed
优化“dealing-with-java-lang-outofmemoryerror-permgen-space-error”
1 parent 89fc50e commit 288d62c
Copy full SHA for 288d62c

File tree

Expand file treeCollapse file tree

1 file changed

+31
-0
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+31
-0
lines changed
+31Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
##如何处理 java.lang.outOfMemoryError PermGen space error
2+
3+
###问题
4+
5+
最近,我在过运行我的web应用时得到:java.lang.OutOfMemoryError: PermGen space。
6+
我的应用是一个典型的 Hibernate/JPA + IceFaces/JSF的应用.运行于Tomcat6.0和jdk1.6.我发布了多次以后,产生了这个错误。
7+
8+
是什么原因造成的,我如何避免?我怎样修复?
9+
10+
11+
#回答
12+
13+
14+
解决的方案是当TomeCat启时,在jvm的的命令行添加参数
15+
16+
-XX:+CMSClassUnloadingEnabled -XX:+CMSPermGenSweepingEnabled
17+
18+
19+
你也可以停止tomcat的服务,直接进入Tomcat/bin目录,运行tomcat6w.exe.在Java的标签下,加好上面的参数。单击"OK",重新启动Tomcat的服务.
20+
21+
22+
如果系统返回错误,提示指定的服务不存在,你可以运行:
23+
24+
tomcat6w //ES//servicename
25+
26+
servicename的名字你可以在services.msc中查看。
27+
28+
stackoverflow链接:
29+
http://stackoverflow.com/questions/88235/dealing-with-java-lang-outofmemoryerror-permgen-space-error
30+
31+

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.