Re: Out-of-Memory Handling in Long-Running / Server Applications
Bob Lee <[email protected]> Sun, 13 Apr 2008 16:56:08 -0700
| Newsgroups | gmane.comp.windows.devel.java.advanced |
|---|---|
| Message-ID | <[email protected]> |
On Sun, Apr 13, 2008 at 3:59 PM, Randall R Schulz <[email protected]> wrote: > What did you mean by "let them die?" > > And I don't know what you mean by "incremental results." There are no > such things. The computation involves heuristic search in a tree that's > incrementally built based on the problem submitted and the > user-specified search heuristic. If you terminate the computation you > have to start from the beginning again. > I guess I don't understand the problem enough to understand why you'd have any more trouble catching an OOME in a separate JVM and reacting to it than you would in the same VM. The advantage to keeping it in a separate VM is that you firewall the troublesome piece of code. Right now, if your calculation takes up all the memory, you might get an OOME in a different thread which tries to perform the smallest allocation. This error will likely come in code which isn't written in such a way that it can defend against it. Or, as you already pointed out, you may get an OOME while trying to recover from the original OOME. If you were able to run your calc in its own VM, you'd be able to recover w/o the recovery itself tanking the entire app. Bob =================================== This list is hosted by DevelopMentor® http://www.develop.com View archives and manage your subscription(s) at http://discuss.develop.com