java.lang.OutOfMemoryError: PermGen space

3,929 views
Skip to first unread message

Liu Yongjian

unread,
Jun 24, 2010, 8:52:29 AM6/24/10
to play-framework
After running a few hours, this problem will come out:
(See in the attached file)

I try to start Play using command: play start [myapp] -Xmx512m -XX:MaxPermSize=256m, but it said , 

Unrecognized VM option `MaxPermSize` 
Could not create the Java virtual machine.



outOfMemory.jpg

Romu

unread,
Jun 24, 2010, 9:16:01 AM6/24/10
to play-fr...@googlegroups.com
try with : 

-Xms512m -Xmx768m

 

2010/6/24 Liu Yongjian <ggd...@gmail.com>


--
You received this message because you are subscribed to the Google Groups "play-framework" group.
To post to this group, send email to play-fr...@googlegroups.com.
To unsubscribe from this group, send email to play-framewor...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/play-framework?hl=en.

Guillaume Bort

unread,
Jun 24, 2010, 9:39:32 AM6/24/10
to play-fr...@googlegroups.com
-XX:MaxPermSize=256m should work. At least it works for me. But
because windows sucks perhaps you need to put some quotes
somewhere....

--
Guillaume Bort, http://guillaume.bort.fr

For anything work-related, use g...@zenexity.fr; for everything else,
write guillau...@gmail.com

Julien Tournay

unread,
Jun 24, 2010, 9:36:46 AM6/24/10
to play-fr...@googlegroups.com
I don't think that the Xmx will change anything since it's a permGen problem.
Unfortunately, there's probably nothing you can do.
Some libraries keep references to the dynamically loaded classes, which is ends up by filling all the permgen space.
It's seems to be a well know issue with  CGLIB, which is used by hibernate.

the -XX:MaxPermSize should work though, you should report that bug.





On Thu, Jun 24, 2010 at 3:16 PM, Romu <rom...@gmail.com> wrote:



--
Real Programmers don't need comments-- the code is obvious.

Liu Yongjian

unread,
Jun 24, 2010, 11:24:10 AM6/24/10
to play-fr...@googlegroups.com
Yes, need to put quotes around -XX:MaxPermSize=256m on Windows

wyz

unread,
Jun 25, 2010, 12:26:53 AM6/25/10
to play-framework
You can add jvm.memory=-XX:PermSize=64m -XX:MaxPermSize=256m to
application.conf also

On Jun 24, 11:24 pm, Liu Yongjian <ggd...@gmail.com> wrote:
> Yes, need to put quotes around -XX:MaxPermSize=256m on Windows
>
>
>
> On Thu, Jun 24, 2010 at 9:36 PM, Julien Tournay <boudhe...@gmail.com> wrote:
> > I don't think that the Xmx will change anything since it's a permGen
> > problem.
> > Unfortunately, there's probably nothing you can do.
> > Some libraries keep references to the dynamically loaded classes, which is
> > ends up by filling all the permgen space.
> > It's seems to be a well know issue with  CGLIB, which is used by hibernate.
>
> > the -XX:MaxPermSize should work though, you should report that bug.
>
> > On Thu, Jun 24, 2010 at 3:16 PM, Romu <rom...@gmail.com> wrote:
>
> >> try with :
>
> >> -Xms512m -Xmx768m
>
> >> 2010/6/24 Liu Yongjian <ggd...@gmail.com>
>
> >> *After running a few hours, this problem will come out:*
> >>> *(See in the attached file)*
> >>> *
> >>> *
> >>> *I try to start Play using command: play start [myapp] -Xmx512m
> >>> -XX:MaxPermSize=256m, but it said , *
> >>> *
> >>> *
> >>> *Unrecognized VM option `MaxPermSize` *
> >>> *Could not create the Java virtual machine.*
> >>> *
> >>> *
> >>> *
> >>> *
> >>> *
> >>> *
>
> >>> --
> >>> You received this message because you are subscribed to the Google Groups
> >>> "play-framework" group.
> >>> To post to this group, send email to play-fr...@googlegroups.com.
> >>> To unsubscribe from this group, send email to
> >>> play-framewor...@googlegroups.com<play-framework%2Bunsubscribe@go oglegroups.com>
> >>> .
> >>> For more options, visit this group at
> >>>http://groups.google.com/group/play-framework?hl=en.
>
> >>  --
> >> You received this message because you are subscribed to the Google Groups
> >> "play-framework" group.
> >> To post to this group, send email to play-fr...@googlegroups.com.
> >> To unsubscribe from this group, send email to
> >> play-framewor...@googlegroups.com<play-framework%2Bunsubscribe@go oglegroups.com>
> >> .
> >> For more options, visit this group at
> >>http://groups.google.com/group/play-framework?hl=en.
>
> > --
> > Real Programmers don't need comments-- the code is obvious.
>
> > --
> > You received this message because you are subscribed to the Google Groups
> > "play-framework" group.
> > To post to this group, send email to play-fr...@googlegroups.com.
> > To unsubscribe from this group, send email to
> > play-framewor...@googlegroups.com<play-framework%2Bunsubscribe@go oglegroups.com>
> > .

chen jeek

unread,
Jun 28, 2010, 10:55:30 PM6/28/10
to play-framework
try add
jvm.memory=-Xms64m -Xmx512m
to
application.conf

On Jun 24, 8:52 pm, Liu Yongjian <ggd...@gmail.com> wrote:
> *After running a few hours, this problem will come out:*
> *(See in the attached file)*
> *
> *
> *I try to start Play using command: play start [myapp] -Xmx512m
> -XX:MaxPermSize=256m, but it said , *
> *
> *
> *Unrecognized VM option `MaxPermSize` *
> *Could not create the Java virtual machine.*
> *
> *
> *
> *
> *
> *
>
>  outOfMemory.jpg
> 111KViewDownload

Romu

unread,
Jun 29, 2010, 3:36:43 AM6/29/10
to play-fr...@googlegroups.com
there is 2 tools u can use to "calibrate" the memory u need :  

jvisualvm.exe and jconsole.exe ( in  JDK /bin folder) . 

U will have 2 graphs with the memory used by your application  . 

it's odd error cause most of the time u have heap memory exception not perm gen .



2010/6/29 chen jeek <jeek...@gmail.com>
--
You received this message because you are subscribed to the Google Groups "play-framework" group.
To post to this group, send email to play-fr...@googlegroups.com.
To unsubscribe from this group, send email to play-framewor...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages