Legacy Knowledge Base
Published Sep. 10, 2025

Liferay service restarts frequently

Written By

Sergio Alonso

How To articles are not official guidelines or officially supported documentation. They are community-contributed content and may not always reflect the latest updates to Liferay DXP. We welcome your feedback to improve How To articles!

While we make every effort to ensure this Knowledge Base is accurate, it may not always reflect the most recent updates or official guidelines.We appreciate your understanding and encourage you to reach out with any feedback or concerns.

Legacy Article

You are viewing an article from our legacy "FastTrack" publication program, made available for informational purposes. Articles in this program were published without a requirement for independent editing or verification and are provided"as is" without guarantee.

Before using any information from this article, independently verify its suitability for your situation and project.

Issue

  • Since we allowed access to some users to contribute content, we are getting many issues with Liferay service restarts.

  • While we are working with the platform, following error message is shown without any apparent reason: 'An error occurred with this application'.

  • when we check the logs we can see Liferay service is restarting.

  • System workload generated by users does not seem too much high since they are only 11 users.

  • Why is happening this instability in the system?

Environment

  • Liferay DXP PaaS
  • PaaS environment Liferay service has reserved 8 GB RAM.
  • Minimum and maximum heap JVM parameters '-Xms' and '-Xmx' are not equal.
  • Maximum heap JVM parameter '-Xmx' is set to 6 GB.
  • Monitoring graphs shows requested memory is greater than 6 GB.  

Resolution

  • Within Liferay PaaS, each of the services are setup and run within a container. And each of these containers are managed by a Kubernetes system in the cloud. Within each of the containers, 'memory' is composed of several different segments. The memory within the container is the sum of all the memory values that make up these segments. If we give too much memory to the segments which make up the service, it can lead to the service’s container to run out of memory and result in restarts (or even not starting).

  • Our metrics drive to us to recommend not to give more than 60% of service's memory to the JVM's heap. In this case:60% of 8 GB = 5 GB.

  • Also, another recommendation would be to set the '-Xms' and '-Xmx' parameters to the same value so memory will not fluctuate as much. 
  • Thus, to fix the issue, there would be to increase Liferay service memory until 60%JVM's heap would get > 6 GB.
    • To achieve this, you may need to lower memory in other services, for example Elasticsearch one.
    • And following the case, Liferay service would need to reserve 12 GB and JVM's heap would be configured with '-Xms7300m -Xmx7300m'

Additional Information

 

 

 

 

Did this article resolve your issue ?

Legacy Knowledge Base