Forums de discussion

CodeCache Settings in Liferay

Nalini Mathusoothanan, modifié il y a 9 années.

CodeCache Settings in Liferay

New Member Publications: 19 Date d'inscription: 20/06/13 Publications récentes
Hi,
We have just moved liferay to Production environment. Business users are using liferay now. After 1 week of continuous usage, we are getting the following error.
java.lang.VirtualMachineError: out of space in CodeCache for adapters. What is the exact reason for this issue?

Is there any specific setting we need to do for JVM like below
-XX:ReservedCodeCacheSize=64m
-XX:+UseCodeCacheFlushing

By default configurations these parameters are not set. Do we need to set these parameters for any liferay server? Could you please confirm?

Regards,
Nalini

PFB the logs>>
16:11:55,332 INFO [stdout] (http--0.0.0.0-8001-12)
16:11:55,335 INFO [stdout] (http--0.0.0.0-8001-12) 16:11:55,334 ERROR [http--0.0.0.0-8001-12][ImportExportPublishPortletAction:118] Exception -- null
16:11:55,355 ERROR [org.apache.catalina.core.ContainerBase.[jboss.web].[default-host].[/].[Main Servlet]] (http--0.0.0.0-8001-12) Servlet.service() for servlet Main Servlet threw exception: java.lang.VirtualMachineError: out of space in CodeCache for adapters
at com.liferay.portal.service.impl.LayoutLocalServiceImpl.exportPortletInfoAsFile(LayoutLocalServiceImpl.java:824) [portal-impl.jar:]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [rt.jar:1.6.0_45]
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) [rt.jar:1.6.0_45]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) [rt.jar:1.6.0_45]
at java.lang.reflect.Method.invoke(Method.java:597) [rt.jar:1.6.0_45]
at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:117) [portal-impl.jar:]
at com.liferay.portal.service.impl.LayoutLocalServiceVirtualLayoutsAdvice.invoke(LayoutLocalServiceVirtualLayoutsAdvice.java:174) [portal-impl.jar:]
at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:113) [portal-impl.jar:]

16:11:56,120 ERROR [org.apache.catalina.core.ContainerBase.[jboss.web].[default-host].[/].[Friendly URL Servlet - Private Group]] (http--0.0.0.0-8001-12) Servlet.service() for servlet Friendly URL Servlet - Private Group threw exception: java.lang.VirtualMachineError: out of space in CodeCache for adapters
at com.liferay.portal.service.impl.LayoutLocalServiceImpl.exportPortletInfoAsFile(LayoutLocalServiceImpl.java:824) [portal-impl.jar:]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [rt.jar:1.6.0_45]
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) [rt.jar:1.6.0_45]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) [rt.jar:1.6.0_45]
at java.lang.reflect.Method.invoke(Method.java:597) [rt.jar:1.6.0_45]
at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:117) [portal-impl.jar:]
at com.liferay.portal.service.impl.LayoutLocalServiceVirtualLayoutsAdvice.invoke(LayoutLocalServiceVirtualLayoutsAdvice.java:174) [portal-impl.jar:]
at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:113) [portal-impl.jar:]
at com.liferay.portal.service.impl.LayoutLocalServiceStagingAdvice.invoke(LayoutLocalServiceStagingAdvice.java:134) [portal-impl.jar:]
Nalini Mathusoothanan, modifié il y a 9 années.

RE: CodeCache Settings in Liferay

New Member Publications: 19 Date d'inscription: 20/06/13 Publications récentes
Hi,
Could you please help?

regards,
Nalini
thumbnail
Sreejith NP, modifié il y a 9 années.

RE: CodeCache Settings in Liferay

New Member Publications: 15 Date d'inscription: 14/03/12 Publications récentes
We too faced the same problem and was resolved after adding the following line in setenv.sh
-XX:ReservedCodeCacheSize=128m

regards
Sreejith
thumbnail
Aditya Bhardwaj, modifié il y a 9 années.

RE: CodeCache Settings in Liferay

Junior Member Publications: 78 Date d'inscription: 08/01/15 Publications récentes
The suggested workaround is to add -XX:ReservedCodeCacheSize=64m to the JVM options. If that doesn't help, try a bigger number.