Task Re-execution Failure After a Process Exits Abnormally

Symptom

When a process exits abnormally, for example, when a task is forcibly terminated by pressing Ctrl+C or running the kill command, a task fails to be restarted.

Possible Cause

The resources start to be released only when the system detects that a process exits abnormally, which takes a maximum of 1 minute. A new task may fail to be executed before all resources are released.

Solution

After the process exits abnormally, wait for 1 minute to ensure that the task can be successfully re-executed.