Foros de discusión

Liferay7-GA3 Tomcat Server get down after a certain time period.

scott E mitchell, modificado hace 6 años.

Liferay7-GA3 Tomcat Server get down after a certain time period.

Junior Member Mensajes: 41 Fecha de incorporación: 1/10/16 Mensajes recientes
Hello Every one,

I am using LF7-GA3, actually we have facing some problem with our public web site and find the reason behind this is due to OutOfMemoryError this is happening after every 10 to 12 days time period.

Error logs:-
16-Aug-2017 05:37:21.931 SEVERE [ajp-nio-8009-ClientPoller-1] org.apache.tomcat.util.net.NioEndpoint$Poller.run
java.lang.OutOfMemoryError: Java heap space


showing java heap is overload we are deal with this manually like restart the tomcat server and clean the log .
Can any one tell me how to automate this because we want this public web site on running state 24/7 or any other alternative how to handle this with permanent solutions?

Thanks in advance...
thumbnail
Olaf Kock, modificado hace 6 años.

RE: Liferay7-GA3 Tomcat Server get down after a certain time period.

Liferay Legend Mensajes: 6403 Fecha de incorporación: 23/09/08 Mensajes recientes
scott E mitchell:
Error logs:-
16-Aug-2017 05:37:21.931 SEVERE [ajp-nio-8009-ClientPoller-1] org.apache.tomcat.util.net.NioEndpoint$Poller.run
java.lang.OutOfMemoryError: Java heap space


There are two permanent solutions:
  • Figure out if you have a memory leak in one of your (most likely custom) components - if yes: Fix it, redeploy, done
  • If Liferay legitimately needs this memory, just raise the memory configuration. If you're running tomcat, this is best done in tomcat/bin/setenv.sh - unless you're running a service on Windows, then it's in the service's configuration
scott E mitchell, modificado hace 6 años.

RE: Liferay7-GA3 Tomcat Server get down after a certain time period.

Junior Member Mensajes: 41 Fecha de incorporación: 1/10/16 Mensajes recientes
Hey Olaf,
Thank you so much for your reply I will check both the use cases.

Thanks.
scott E mitchell, modificado hace 6 años.

RE: Liferay7-GA3 Tomcat Server get down after a certain time period.

Junior Member Mensajes: 41 Fecha de incorporación: 1/10/16 Mensajes recientes
Hello Olaf,

Olaf Kock:

There are two permanent solutions:
  • Figure out if you have a memory leak in one of your (most likely custom) components - if yes: Fix it, redeploy, done

As suggest for this point actually we don't have any custom components so there is no possibility of memory leakage.

  • If Liferay legitimately needs this memory, just raise the memory configuration. If you're running Tomcat, this is best done in tomcat/bin/setenv.sh - unless you're running a service on Windows, then it's in the service's configuration

  • And for this like we have set around 4gb assign to CATALINA_OPTS, but it's again not working please have look setenv.sh file
    CATALINA_OPTS = -Xmx4096m -XX:MaxPermSize=384m is that correct because previously we have -Xmx1024m -XX:MaxPermSize=384m configuration,please suggest.

    TIA......
    thumbnail
    Olaf Kock, modificado hace 6 años.

    RE: Liferay7-GA3 Tomcat Server get down after a certain time period.

    Liferay Legend Mensajes: 6403 Fecha de incorporación: 23/09/08 Mensajes recientes
    scott E mitchell:

    And for this like we have set around 4gb assign to CATALINA_OPTS, but it's again not working please have look setenv.sh file
    CATALINA_OPTS = -Xmx4096m -XX:MaxPermSize=384m is that correct because previously we have -Xmx1024m -XX:MaxPermSize=384m configuration,please suggest.


    The MaxPermSize doesn't help much, as you say you're on Liferay7 which requires Java8, which doesn't support this option any more. Any you're running out of HeapSpace to begin with - so this is just FYI.

    I'd say: Run a profiler or take a heap dump and identify where the memory goes. Or attach jconsole (through JMX) and monitor the memory usage of your portal - see if you can identify any correlations.

    Plus, make extra-extra-extra sure that you don't have custom components - do you not even have a theme? All right out-of-the-box? It's not like there's no possibility that Liferay could contain memory leaks - just if it did, more people would have this issue.