0

My java application running in linux always disappear every two hours, How can I find the root cause. First I think it is killed by oom, so I change /proc//oom_adj t0 -17, doesn't work. Second I user strace -p PID, the exit code is 1.

lookeroo
  • 41
  • 7

2 Answers2

0

You can configure JMX on the application and attach JConsole or JVisualVM and monitor the heap. You can also enable garbage collection on the JVM and have it write to a file gc.log. You can view the log to see what is happening with memory on the process.

tom
  • 1,331
  • 1
  • 15
  • 28
0

You may be having problems with user limits or ulimit, recently I had a problem with java in linux to read very large files, the same problem happened, my application disappears without explanation.

For my case the solution was to modify the /etc/security/limits.conf file by adding my user to the file as follows:

<user> soft nofile 4096
<user> hard nofile 8192

In your case the solution may be different, I advise you to take a look here or see the man page, you can have better explanations.

J.Adler
  • 1,303
  • 11
  • 19