0

I have a java program that needs to be continuously run on a Linux Virtual private server. It works fine but after several minutes it gets terminated with a message "Killed." I have plenty of memory available so this does not look like an Out of Memory.

MemTotal:         262144 kB
MemFree:          140412 kB
Cached:            66472 kB
SwapTotal:        524288 kB
SwapFree:         517216 kB

How do I figure out the underlying issue? How do I fix this?

1
  • 2
    Are you running it as a background 'daemon'? Does it die when you log out? How long does it run before dying? Does this particular class of virtual server have any automatic log-out processes? We'll need much more information, specifics, to be able to help. Where does it say 'killed"? stdout? stderr? a log somewhere (YOUR code may not log, but java runs on a virtual machine itself, which WILL log things.) What phase of the moon is required?
    – lornix
    Jul 25, 2013 at 2:16

2 Answers 2

1

Run ulimit -a and see if there are any limits that you might be hitting, then change them accordingly.

0

Check the logs of the Java program, which should give you some clues. Look in the directory where you installed it for a logs directory or similar.

3
  • The program is a one written by me and it does not generate any logs since the process is terminated externally. Jul 24, 2013 at 19:19
  • Check /var/log/kern.log, /var/log/dmesg, and /var/log/messages.
    – LawrenceC
    Jul 24, 2013 at 20:55
  • if you are the authore of the program and it doesn't generate any logs, then it is probably time to start implementing a log-facility. a daemon should always be able to log somewhere, in case there is trouble...
    – umläute
    Jul 25, 2013 at 14:41

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .