Glossary

Restart loop (flapping)

What is a restart loop?

In short

A restart loop is a service that crashes, is restarted automatically, and crashes again. It is also called flapping or, for containers, a crash loop.

Why it matters

Automatic restarts hide the problem: the service looks up most of the time, but requests fail every few seconds. The cause is in the first error the service logs on start, often a bad config, a missing file or a port already in use.

How to check it on Linux

Restart count for a unit, or for a Docker container:

systemctl show -p NRestarts myapp && docker inspect -f "{{.RestartCount}}" myapp

What Opservo does about it

The health score flags a service that keeps restarting, so a loop is not mistaken for a running service. The Opservo Health Standard

Restart loop (flapping), answered

What is a restart loop?+

A restart loop is a service that crashes, is restarted automatically, and crashes again. It is also called flapping or, for containers, a crash loop.

How do I check a restart loop on Linux?+

Restart count for a unit, or for a Docker container: systemctl show -p NRestarts myapp && docker inspect -f "{{.RestartCount}}" myapp

How does Opservo handle a restart loop?+

The health score flags a service that keeps restarting, so a loop is not mistaken for a running service.

Related terms

Opservo watches all of this on every server and explains problems in plain English. Free for 2 servers.