Ask Questions and Find Answers
Important:
Ask is now read-only. You can review any existing questions and answers, but not add anything new.
But - don't panic! While ask is no more, we've replaced it with discuss - the new Liferay Discussion Forum! Read more here here or just visit the site here:
discuss.liferay.com
RE: Liferay JVM Setting Example
We are currently in the process of setting up our Liferay instance and we are trying to expand the amount of memory the server alots to Liferay.
A few important details: Liferay is the only app on this server utilizing the JVM, we are university expecting between a few thousand and ten thousand concurrent users at any given time, and we have been experiencing regular slowness since we've started on-boarding our apps into Liferay.
Currently our configuration has 16 GBs of RAM and around 1 TB of disk space. We were hoping to push the JVM up to 8 GB of allotable RAM, but Liferay throws a "not enough memory" error whenever we attempt to expand it. Does anyone have any suggestions or examples about a suggested setup? Here is our current Tomcat config:
"$CATALINA_OPTS -Dfile.encoding=UTF-8 -Djava.locale.providers=JRE,COMPAT,CLDR -Djava.net.preferIPv4Stack=true -Duser.timezone=GMT -Xms4096m -Xmx4096m -XX:MaxNewSize=1536m -XX:MaxMetaspaceSize=768m -XX:MetaspaceSize=768m -XX:NewSize=1536m -XX:SurvivorRatio=7"
A few important details: Liferay is the only app on this server utilizing the JVM, we are university expecting between a few thousand and ten thousand concurrent users at any given time, and we have been experiencing regular slowness since we've started on-boarding our apps into Liferay.
Currently our configuration has 16 GBs of RAM and around 1 TB of disk space. We were hoping to push the JVM up to 8 GB of allotable RAM, but Liferay throws a "not enough memory" error whenever we attempt to expand it. Does anyone have any suggestions or examples about a suggested setup? Here is our current Tomcat config:
"$CATALINA_OPTS -Dfile.encoding=UTF-8 -Djava.locale.providers=JRE,COMPAT,CLDR -Djava.net.preferIPv4Stack=true -Duser.timezone=GMT -Xms4096m -Xmx4096m -XX:MaxNewSize=1536m -XX:MaxMetaspaceSize=768m -XX:MetaspaceSize=768m -XX:NewSize=1536m -XX:SurvivorRatio=7"
Which Liferay version do you use?
Might be obvious, but please make sure you use a 64bit Java SDK.
Are you on Windows or Linux?
When do you get the error? At startup? Later, after some time running?
In general, it should work, I just started a Liferay server with:
CATALINA_OPTS="$CATALINA_OPTS -Dfile.encoding=UTF-8 -Djava.locale.providers=JRE,COMPAT,CLDR -Djava.net.preferIPv4Stack=true -Duser.timezone=GMT -Xms8192m -Xmx8192m -XX:MaxNewSize=1536m -XX:MaxMetaspaceSize=768m -XX:MetaspaceSize=768m -XX:NewSize=1536m -XX:SurvivorRatio=7"
Might be obvious, but please make sure you use a 64bit Java SDK.
Are you on Windows or Linux?
When do you get the error? At startup? Later, after some time running?
In general, it should work, I just started a Liferay server with:
CATALINA_OPTS="$CATALINA_OPTS -Dfile.encoding=UTF-8 -Djava.locale.providers=JRE,COMPAT,CLDR -Djava.net.preferIPv4Stack=true -Duser.timezone=GMT -Xms8192m -Xmx8192m -XX:MaxNewSize=1536m -XX:MaxMetaspaceSize=768m -XX:MetaspaceSize=768m -XX:NewSize=1536m -XX:SurvivorRatio=7"
We are on DXP 7.2 that runs on a 64-bit Linux VM and we are just using the Tomcat Bundled distro.
Currently our Java version is openjdk version "11.0.6", but it is 64-bit as well.
Currently our Java version is openjdk version "11.0.6", but it is 64-bit as well.
I tried it with JDK 8, so we have at least there a clear difference. My best guess is that you face a JDK 11 issue, since you use DXP, I would advise that you open a ticket.
Copyright © 2025 Liferay, Inc
• Privacy Policy
Powered by Liferay™