Permalink
Browse files

Forcibly kill JVM on OOM.

  • Loading branch information...
Robert Newson
Robert Newson committed Dec 8, 2010
1 parent bba040b commit 6e6c4b5a9f6004fd9aa34c42d697966ff0607f37
Showing with 8 additions and 1 deletion.
  1. +5 −0 src/main/assembly/dist.xml
  2. +2 −0 src/main/bin/kill_ppid
  3. +1 −1 src/main/bin/run
@@ -20,6 +20,11 @@
<fileMode>755</fileMode>
<outputDirectory>/bin</outputDirectory>
</file>
+ <file>
+ <source>${project.basedir}/src/main/bin/kill_ppid</source>
+ <fileMode>755</fileMode>
+ <outputDirectory>/bin</outputDirectory>
+ </file>
<file>
<source>${project.basedir}/src/main/conf/couchdb-lucene.ini</source>
<fileMode>644</fileMode>
View
@@ -0,0 +1,2 @@
+#!/bin/sh
+kill -9 "$PPID"
View
@@ -3,7 +3,7 @@
[ -z $CL_BASEDIR ] && CL_BASEDIR=`dirname "$0"`
cd $CL_BASEDIR/..
-JAVA_OPTS="-server -Xmx1g"
+JAVA_OPTS="-server -Xmx1g -XX:OnOutOfMemoryError=bin/kill_ppid"
CLASS=com.github.rnewson.couchdb.lucene.Main
CLASSPATH="conf"

0 comments on commit 6e6c4b5

Please sign in to comment.