Monitors and gracefully terminates a Ruby application based on configurable memory usage,execution time, iteration count, or custom conditions