Forums de discussion

OutOfMemoryError: PermGen space issue

Dipak Jadhav, modifié il y a 11 années.

OutOfMemoryError: PermGen space issue

New Member Publications: 9 Date d'inscription: 02/04/13 Publications récentes
Hi ,

I am getting following exception. how to check which module is causing this exception? Also need solution for this.

23:58:16,169 ERROR [MemoryQuartzSchedulerEngineInstance_Worker-3][SimpleThreadPool:?] Error while executing the Runnable:
java.lang.OutOfMemoryError: PermGen space

Is there any tool to check the memory leak found in liferay portlet?

Thanks,
Dipak
thumbnail
David H Nebinger, modifié il y a 11 années.

RE: OutOfMemoryError: PermGen space issue

Liferay Legend Publications: 14919 Date d'inscription: 02/09/06 Publications récentes
Permgen is not allocated to a single portlet, it is consumed by the entire java process (your app container, all your web apps, etc.).

If you're getting permgen exceptions, it is an indication that the app container as a whole does not have enough assigned to handle what you're throwing at it. Your only solution is to increase the permgen space until it is large enough to handle the load.
thumbnail
Julio Varela Gómez, modifié il y a 11 années.

RE: OutOfMemoryError: PermGen space issue

Regular Member Publications: 130 Date d'inscription: 14/01/08 Publications récentes
At the start of your server tomcat, jboss etc ... increasing values ​​for:
example
-Xmx1024m
-XX: MaxPermSize = 256m
thumbnail
Kartik Sharma, modifié il y a 11 années.

RE: OutOfMemoryError: PermGen space issue

Junior Member Publications: 44 Date d'inscription: 03/11/09 Publications récentes
Which application server are you using? Can you please provide the JVM parameters ? you may have to adjust the heap and PermGen by adding -XX:MaxPermSize=256M



Thanks,
Kartik
Manisha Thote, modifié il y a 11 années.

RE: OutOfMemoryError: PermGen space issue

New Member Publications: 8 Date d'inscription: 13/02/12 Publications récentes
Add the parameters as -vmargs -XXemoticonermSize=64M -XX:MaxPermSize=128M for me it works
thumbnail
Gabriel Bustos Padilla, modifié il y a 10 années.

RE: OutOfMemoryError: PermGen space issue

Junior Member Publications: 63 Date d'inscription: 06/03/13 Publications récentes
Hi! I have seen the solutions in several threads opens with this this issue. I tried to apply the solution that I see and the stenv.sh has this code of configuration:

JAVA_OPTS="$JAVA_OPTS -Dfile.encoding=UTF8 -Dorg.apache.catalina.loader.WebappClassLoader.ENABLE_CLEAR_REFERENCES=false -Duser.timezone=GMT -Xms1024m -Xmx1024m -XX:MaxPermSize=768m"


The server have 2Gb of RAM but.... I continue with the same problem! :-(

I need help!!

best regards and thanks in advance
Dharmen Panchal, modifié il y a 10 années.

RE: OutOfMemoryError: PermGen space issue

New Member Publications: 13 Date d'inscription: 13/02/13 Publications récentes
Hi Dipak,

You need to increase your permGen Space.

liferay/tomcat/bin/ open setenv.bat for windows or setenv.sh for linux Operating system.

Find this paratmeter -XX:MaxPermSize increase size of this parameter.

i.e
Set "CATALINA_OPTS=%JAVA_OPTS% -Dfile.encoding=UTF8 -Djava.net.preferIPv4Stack=true -Dorg.apache.catalina.loader.WebappClassLoader.ENABLE_CLEAR_REFERENCES=false -Duser.timezone=GMT -Xmx1024m -XX:MaxPermSize=500m"

"The standard memory settings are in JAVA_OPTS, done in setenv.sh and setenv.bat. This is bad practice and should be changed to CATALINA_OPTS. One example for why it's bad: JAVA_OPTS is used to start any java process, including the shutdown of Tomcat. If you allocate 8G of RAM for running tomcat, you don't want to allocate these for the JVM that gets started up just to tell tomcat to stop (there will be a second process for short time). If all the memory is allocated immediately, shutting down might even fail with OutOfMemory Exceptions"

https://issues.liferay.com/browse/LPS-26464

Thanks,
Dharmen Panchal.
dpanchal@surekhatech.com
www.surekhatech.com
thumbnail
Gabriel Bustos Padilla, modifié il y a 10 années.

RE: OutOfMemoryError: PermGen space issue

Junior Member Publications: 63 Date d'inscription: 06/03/13 Publications récentes
Thanks! I tried it putting this code into the setenv.sh:

CATALINA_OPTS="$JAVA_OPTS -Dfile.encoding=UTF8 -Dorg.apache.catalina.loader.WebappClassLoader.ENABLE_CLEAR_REFERENCES=false -Duser.timezone=GMT -Xms1024m -Xmx1024m -XX:MaxPermSize=500m"

And the total RAM adjudicated to the machine is 2 Gb, like you can see afther the free command:


$ free
total used free shared buffers cached
Mem: 1922464 1855384 67080 0 7132 34116
-/+ buffers/cache: 1814136 108328
Swap: 4128760 1571232 2557528


What happends?! :-(

Thanks in advance
thumbnail
Vilmos Papp, modifié il y a 8 années.

Re: [1. Installation / Deployment / Setup] RE: OutOfMemoryError: PermGen sp

Liferay Master Publications: 529 Date d'inscription: 21/10/10 Publications récentes
Hi webmaster,

The footer of the e-mail message is not well formed (there's no line
break between the parts) and the link to the message board thread is not
valid. shoudl be:
https://www.liferay.com/community/forums/-/message_boards/view_message/26308627

Regards,
Vilmos Papp


On 07/09/2013 11:26 PM, Webmaster wrote:
> Hi Dipak,
>
> You need to increase your permGen Space.
>
> liferay/tomcat/bin/ open setenv.bat for windows or setenv.sh for linux
> Operating system.
>
> Find this paratmeter -XX:MaxPermSize increase size of this parameter.
>
> i.e
> Set "CATALINA_OPTS=%JAVA_OPTS% -Dfile.encoding=UTF8
> -Djava.net.preferIPv4Stack=true
> -Dorg.apache.catalina.loader.WebappClassLoader.ENABLE_CLEAR_REFERENCES=false
> -Duser.timezone=GMT -Xmx1024m -XX:MaxPermSize=500m"
>
> "The standard memory settings are in JAVA_OPTS, done in setenv.sh and
> setenv.bat. This is bad practice and should be changed to
> CATALINA_OPTS. One example for why it's bad: JAVA_OPTS is used to
> start any java process, including the shutdown of Tomcat. If you
> allocate 8G of RAM for running tomcat, you don't want to allocate
> these for the JVM that gets started up just to tell tomcat to stop
> (there will be a second process for short time). If all the memory is
> allocated immediately, shutting down might even fail with OutOfMemory
> Exceptions"
>
> https://issues.liferay.com/browse/LPS-26464
>
> Thanks,
> Dharmen Panchal.
> dpanchal@surekhatech.com
> www.surekhatech.com
> --
> Liferay.com Message Boards
> https://www.liferay.com/group/control_panel/manage?doAsGroupId=14&refererPlid=8440537/-/message_boards/view_message/26308627
> webmaster@liferay.com https://www.liferay.com
thumbnail
Vilmos Papp, modifié il y a 8 années.

Re: [1. Installation / Deployment / Setup] RE: OutOfMemoryError: PermGen sp

Liferay Master Publications: 529 Date d'inscription: 21/10/10 Publications récentes
Hi webmaster,

The footer of the e-mail message is not well formed (there's no line
break between the parts) and the link to the message board thread is not
valid. shoudl be:
https://www.liferay.com/community/forums/-/message_boards/view_message/26308627

Regards,
Vilmos Papp


On 07/09/2013 11:26 PM, Webmaster wrote:
> Hi Dipak,
>
> You need to increase your permGen Space.
>
> liferay/tomcat/bin/ open setenv.bat for windows or setenv.sh for linux
> Operating system.
>
> Find this paratmeter -XX:MaxPermSize increase size of this parameter.
>
> i.e
> Set "CATALINA_OPTS=%JAVA_OPTS% -Dfile.encoding=UTF8
> -Djava.net.preferIPv4Stack=true
> -Dorg.apache.catalina.loader.WebappClassLoader.ENABLE_CLEAR_REFERENCES=false
> -Duser.timezone=GMT -Xmx1024m -XX:MaxPermSize=500m"
>
> "The standard memory settings are in JAVA_OPTS, done in setenv.sh and
> setenv.bat. This is bad practice and should be changed to
> CATALINA_OPTS. One example for why it's bad: JAVA_OPTS is used to
> start any java process, including the shutdown of Tomcat. If you
> allocate 8G of RAM for running tomcat, you don't want to allocate
> these for the JVM that gets started up just to tell tomcat to stop
> (there will be a second process for short time). If all the memory is
> allocated immediately, shutting down might even fail with OutOfMemory
> Exceptions"
>
> https://issues.liferay.com/browse/LPS-26464
>
> Thanks,
> Dharmen Panchal.
> dpanchal@surekhatech.com
> www.surekhatech.com
> --
> Liferay.com Message Boards
> https://www.liferay.com/group/control_panel/manage?doAsGroupId=14&refererPlid=8440537/-/message_boards/view_message/26308627
> webmaster@liferay.com https://www.liferay.com
thumbnail
Vilmos Papp, modifié il y a 8 années.

Re: [1. Installation / Deployment / Setup] RE: OutOfMemoryError: PermGen sp

Liferay Master Publications: 529 Date d'inscription: 21/10/10 Publications récentes
Hi webmaster,

The footer of the e-mail message is not well formed (there's no line
break between the parts) and the link to the message board thread is not
valid. shoudl be:
https://www.liferay.com/community/forums/-/message_boards/view_message/26308627

Regards,
Vilmos Papp


On 07/09/2013 11:26 PM, Webmaster wrote:
> Hi Dipak,
>
> You need to increase your permGen Space.
>
> liferay/tomcat/bin/ open setenv.bat for windows or setenv.sh for linux
> Operating system.
>
> Find this paratmeter -XX:MaxPermSize increase size of this parameter.
>
> i.e
> Set "CATALINA_OPTS=%JAVA_OPTS% -Dfile.encoding=UTF8
> -Djava.net.preferIPv4Stack=true
> -Dorg.apache.catalina.loader.WebappClassLoader.ENABLE_CLEAR_REFERENCES=false
> -Duser.timezone=GMT -Xmx1024m -XX:MaxPermSize=500m"
>
> "The standard memory settings are in JAVA_OPTS, done in setenv.sh and
> setenv.bat. This is bad practice and should be changed to
> CATALINA_OPTS. One example for why it's bad: JAVA_OPTS is used to
> start any java process, including the shutdown of Tomcat. If you
> allocate 8G of RAM for running tomcat, you don't want to allocate
> these for the JVM that gets started up just to tell tomcat to stop
> (there will be a second process for short time). If all the memory is
> allocated immediately, shutting down might even fail with OutOfMemory
> Exceptions"
>
> https://issues.liferay.com/browse/LPS-26464
>
> Thanks,
> Dharmen Panchal.
> dpanchal@surekhatech.com
> www.surekhatech.com
> --
> Liferay.com Message Boards
> https://www.liferay.com/group/control_panel/manage?doAsGroupId=14&refererPlid=8440537/-/message_boards/view_message/26308627
> webmaster@liferay.com https://www.liferay.com
thumbnail
Vilmos Papp, modifié il y a 8 années.

Re: [1. Installation / Deployment / Setup] RE: OutOfMemoryError: PermGen sp

Liferay Master Publications: 529 Date d'inscription: 21/10/10 Publications récentes
Hi webmaster,

The footer of the e-mail message is not well formed (there's no line
break between the parts) and the link to the message board thread is not
valid. shoudl be:
https://www.liferay.com/community/forums/-/message_boards/view_message/26308627

Regards,
Vilmos Papp


On 07/09/2013 11:26 PM, Webmaster wrote:
> Hi Dipak,
>
> You need to increase your permGen Space.
>
> liferay/tomcat/bin/ open setenv.bat for windows or setenv.sh for linux
> Operating system.
>
> Find this paratmeter -XX:MaxPermSize increase size of this parameter.
>
> i.e
> Set "CATALINA_OPTS=%JAVA_OPTS% -Dfile.encoding=UTF8
> -Djava.net.preferIPv4Stack=true
> -Dorg.apache.catalina.loader.WebappClassLoader.ENABLE_CLEAR_REFERENCES=false
> -Duser.timezone=GMT -Xmx1024m -XX:MaxPermSize=500m"
>
> "The standard memory settings are in JAVA_OPTS, done in setenv.sh and
> setenv.bat. This is bad practice and should be changed to
> CATALINA_OPTS. One example for why it's bad: JAVA_OPTS is used to
> start any java process, including the shutdown of Tomcat. If you
> allocate 8G of RAM for running tomcat, you don't want to allocate
> these for the JVM that gets started up just to tell tomcat to stop
> (there will be a second process for short time). If all the memory is
> allocated immediately, shutting down might even fail with OutOfMemory
> Exceptions"
>
> https://issues.liferay.com/browse/LPS-26464
>
> Thanks,
> Dharmen Panchal.
> dpanchal@surekhatech.com
> www.surekhatech.com
> --
> Liferay.com Message Boards
> https://www.liferay.com/group/control_panel/manage?doAsGroupId=14&refererPlid=8440537/-/message_boards/view_message/26308627
> webmaster@liferay.com https://www.liferay.com
thumbnail
Vilmos Papp, modifié il y a 8 années.

Re: [1. Installation / Deployment / Setup] RE: OutOfMemoryError: PermGen sp

Liferay Master Publications: 529 Date d'inscription: 21/10/10 Publications récentes
Hi webmaster,

The footer of the e-mail message is not well formed (there's no line
break between the parts) and the link to the message board thread is not
valid. shoudl be:
https://www.liferay.com/community/forums/-/message_boards/view_message/26308627

Regards,
Vilmos Papp


On 07/09/2013 11:26 PM, Webmaster wrote:
> Hi Dipak,
>
> You need to increase your permGen Space.
>
> liferay/tomcat/bin/ open setenv.bat for windows or setenv.sh for linux
> Operating system.
>
> Find this paratmeter -XX:MaxPermSize increase size of this parameter.
>
> i.e
> Set "CATALINA_OPTS=%JAVA_OPTS% -Dfile.encoding=UTF8
> -Djava.net.preferIPv4Stack=true
> -Dorg.apache.catalina.loader.WebappClassLoader.ENABLE_CLEAR_REFERENCES=false
> -Duser.timezone=GMT -Xmx1024m -XX:MaxPermSize=500m"
>
> "The standard memory settings are in JAVA_OPTS, done in setenv.sh and
> setenv.bat. This is bad practice and should be changed to
> CATALINA_OPTS. One example for why it's bad: JAVA_OPTS is used to
> start any java process, including the shutdown of Tomcat. If you
> allocate 8G of RAM for running tomcat, you don't want to allocate
> these for the JVM that gets started up just to tell tomcat to stop
> (there will be a second process for short time). If all the memory is
> allocated immediately, shutting down might even fail with OutOfMemory
> Exceptions"
>
> https://issues.liferay.com/browse/LPS-26464
>
> Thanks,
> Dharmen Panchal.
> dpanchal@surekhatech.com
> www.surekhatech.com
> --
> Liferay.com Message Boards
> https://www.liferay.com/group/control_panel/manage?doAsGroupId=14&refererPlid=8440537/-/message_boards/view_message/26308627
> webmaster@liferay.com https://www.liferay.com