[Swift-devel] behaviour on out-of-memory
Ben Clifford
benc at hawaga.org.uk
Fri Feb 8 11:36:21 CST 2008
On Fri, 8 Feb 2008, Mihael Hategan wrote:
> Not correct semantics when swift acts as a service (think I2U2). I
> should probably find a way to immediately cancel a whole workflow when
> OOMs are caught so that client software can un-reference it and
> eventually get back to stability. But again, not having enough memory
> may cause arbitrary breakage in arbitrary threads, so it's hard to
> guarantee consistency after such a thing.
My philosophy, which is sort of backed up by the javadocs, is that OOM
Errors are a signal that the JVM is so broken that it cannot continue -
its the end of the universe as far as the JVM is concerned and there's
nothing you can do. If you're so foolish as to run something (eg Swift) in
your web server JVM that puts the JVM into that state, then sucker to you!
cf. javadoc VirtualMachineError:
> Thrown to indicate that the Java Virtual Machine is broken or has run
> out of resources necessary for it to continue operating.
There's a bunch more memory management stuff in java 5 (eg the MXBeans)
which are perhaps interesting - eg. when memory gets low, stop doing
certain things / more cleanly abort select pieces of what lives in the
JVM.
--
More information about the Swift-devel
mailing list