LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   Red Hat Linux server (https://www.linuxquestions.org/questions/linux-general-1/red-hat-linux-server-4175492106/)

just.srad 01-22-2014 12:15 AM

Red Hat Linux server
 
Hi,

I have encountered a server hung due to the "Out of Memory" caused by a Java process.

May someone enlighten me on how to investigate the error..like which log files i can look out for in order for me to check actually how much memory is required by this particular Java process..

Thanks in advance.


Justin

SAbhi 01-22-2014 02:23 AM

which log file you saw the error ?
It is generally seen in catalina.out and gc.out would some info too, in case of tomcat so again my question is what are you using to serve java application? is it tomcat or jboss ?

just.srad 01-22-2014 05:40 PM

Actually, it's customer's server and my job is to help out in doing the monitoring.

In regard to your question, perhaps i could use the command "pstree" to check which application is using the java.

I shall post it here again once i got the information.

SAbhi 01-22-2014 07:27 PM

well that would not help to resolve issue, you may need to get the detailed logs..

just.srad 01-22-2014 09:15 PM

ok.. which log files should i look out for ? Maybe you can make some assumption of the applications that they use which in turn run the
Java process.

Thanks.

SAbhi 01-22-2014 09:18 PM

NO Assumptions!! as i said in my earlier post. you have to ask your client for the info.

trickykid 01-24-2014 08:22 PM

You need to check the java logs, in most cases java outputs most information in a file called catalina.out. It just depends on the actual program. Without details, no on here will know. In most cases, there are two ways to fix java "out of memory" errors.. you either start Java to use more JVM max memory in the programs JAVA options or you actually need to add more memory to your system.

just.srad 01-26-2014 09:41 PM

Thanks trickykid, your suggestion is helpful. :-)

SAbhi 01-26-2014 10:17 PM

well i think you restarted java and that worked for you..so would add here that this "out of memory" error could be because of memory leak or as @trickykid said, a possibility that your application actually needs more memory to grow. The suggestion would again be check the logs to see what caused it.

just.srad 01-27-2014 10:00 PM

Thanks Sabhi. :-)


All times are GMT -5. The time now is 09:26 PM.