public static void inspectThrowable ( Throwable t ) { boolean isUnstable = false ; if ( t instanceof OutOfMemoryError ) isUnstable = true ; if ( DatabaseDescriptor . getDiskFailurePolicy ( ) == Config . DiskFailurePolicy . die ) if ( t instanceof FSError || t instanceof CorruptSSTableException ) isUnstable = true ; // Check for file handle exhaustion if ( t instanceof FileNotFoundException || t instanceof SocketException ) if ( t . getMessage ( ) . contains ( "Too many open files" ) ) isUnstable = true ; if ( isUnstable ) killer . killCurrentJVM ( t ) ; }
Certain Throwables and Exceptions represent Die conditions for the server .