This forum is no longer active. Please post your questions to our new community site

Forums Liferay

Out of memory error + tomcat 6

Subscribe to Out of memory error + tomcat 6 6 post(s), 2 voice(s)

 
Avatar amit 3 post(s)

Hi All,

I am new to Liferay. I apologize if the topic repeated.

I am using: JDK6, Eclipse 3.4, Tomcat 6, RAM of 2GB.

I am getting following error when I start tomcat using Eclipse 3.4 IDE:

SEVERE: Servlet.service() for servlet Friendly URL Servlet – Public threw exception
java.lang.OutOfMemoryError: Java heap space at java.lang.String.valueOf(String.java:2918) at java.lang.Character.toString(Character.java:2149) at com.yahoo.platform.yui.compressor.JavaScriptCompressor.<clinit>(JavaScriptCompressor.java:69) at com.liferay.portal.util.MinifierUtil._minifyJavaScript(MinifierUtil.java:80) at com.liferay.portal.util.MinifierUtil.minifyJavaScript(MinifierUtil.java:52) at com.liferay.portal.servlet.filters.strip.StripFilter.strip(StripFilter.java:251) at com.liferay.portal.servlet.filters.strip.StripFilter.processFilter(StripFilter.java:159) at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:91)

I did following to resolve the above error:

In Environment variables – set JAVA_OPTS = -Xms512m -Xmx1024m

In tomcat..catalina.bat…updated this file as:

set JAVA_OPTS = ..... -Xms512m -Xmx1024m

However above settings were of no help for me…

Let me know if any of you gone through this…

Thanks

 
Avatar Beltrán Rueda Administrator 3,714 post(s)

Hi,

Could you try to decrease the minimun free memory available changing the Xms512m parameter to Xms64m ?

Cheers.

 
Avatar amit 3 post(s)

Hi Beltran,

Thanks for the quick reply…

I changed JAVA_OPTS = Xms64m -Xmx1024m

Still no luck…Now strangely error console throws a different error than before..it looks like -

16:15:04,906 ERROR [ErrorLogger:2156] An error occured while scanning for the next trigger to fire.
org.quartz.JobPersistenceException: Failed to obtain DB connection from data source ‘ds’: java.lang.OutOfMemoryError: Java heap space [See nested exception: java.lang.OutOfMemoryError: Java heap space] at org.quartz.impl.jdbcjobstore.JobStoreSupport.getConnection(JobStoreSupport.java:640) at org.quartz.impl.jdbcjobstore.JobStoreTX.getNonManagedTXConnection(JobStoreTX.java:72) at org.quartz.impl.jdbcjobstore.JobStoreSupport.executeInNonManagedTXLock(JobStoreSupport.java:3659) at org.quartz.impl.jdbcjobstore.JobStoreSupport.acquireNextTrigger(JobStoreSupport.java:2654) at org.quartz.core.QuartzSchedulerThread.run(QuartzSchedulerThread.java:235)
Caused by: java.lang.OutOfMemoryError: Java heap space at java.util.AbstractList.iterator(AbstractList.java:273) at java.util.AbstractList.hashCode(AbstractList.java:524) at java.util.HashMap.get(HashMap.java:300)

 
Avatar Beltrán Rueda Administrator 3,714 post(s)

Hi,

In Windows you should to reinstall the Tomcat service. Have you reinstalled the service? Take a look this post: https://bitnami.com/forums/forums/4/topics/1041

Cheers.

 
Avatar amit 3 post(s)

Hi,

As the topic you suggest…I couldnt find apache-tomcat/scripts/serviceinstall.bat file in the bundled tomcat of liferay.

In fact, there is no folder named scripts in tomcat version of liferay.

Thanks

 
Avatar Beltrán Rueda Administrator 3,714 post(s)

Mmm it is strange. Are you using the BitNami Liferay Stack? It should be at C:\Program Files\BitNami Liferay Stack\apache-tomcat\scripts\serviceinstall.bat.

Forums Liferay