Adding attempts to recover from OOM