A container can restart tens of thousands of times with exit code 0 because exit code 0 and the restart decision are two separate things. Exit code 0 means the process finished without error. Whether the container starts again depends on the restart policy set by whatever supervises it. In Kubernetes, the default restartPolicy: Always restarts a container after any termination, including a successful one. A process that exits cleanly every few seconds, under a policy that always restarts it, will produce a large restart count without any failure ever occurring.
Why exit code 0 does not stop a restart
An exit code is a report from the process to its parent about how its run ended. Zero means the run completed successfully. It says nothing about whether the supervisor should launch the process again. That decision belongs to the restart policy, which is configuration on the platform side.
As an Amazon Associate I earn from qualifying purchases.
This is why a restart count and an exit code can look contradictory. The count tracks how many times the supervisor started the container again. The exit code describes only the most recent run. A container that runs a short job, exits 0, and is restarted under a policy that always restarts it will show exactly the pattern in this incident: rising restarts, all successful exits.
Free tools Windows power users keep installed
One-click scans. No signup required.
The title does not say which orchestrator or runtime was involved. Kubernetes is used below as a documented example. The behavior described applies to that platform’s policies. It is not established here as the confirmed cause of this particular event.
#1 Best Overall
- 【Powerful Load-bearing】12U Network Rack Open Frame is constructed from durable cold rolled steel; Rack shelf supports enhance stability, wall-mounted capacity of 130lbs, the ground-mounted up to 260lbs
- 【Considerate Designs】Open-frame layout, including a top panel adding space, anti-slip shelf stops fixing devices and compatible racks for stack and expansion to meet requirements of home server rack
- 【Complete Accessories】A 12U open frame server rack, two ventilated shelves, four shelf stops, four velcro straps and a set of equipment mounting screws
- 【Versatile Application】Ideal for space-efficient multi-device setups in warehouses, retail, classrooms, offices and more; Excellent choices as AV Rack/IT Rack
- 【Effortless Setup】 Network Rack includes hardware, a comprehensive manual, mounting hole drilling template and an online assembly video to simplify setup
What CrashLoopBackOff actually means
Kubernetes shows the status CrashLoopBackOff when a container keeps restarting and the kubelet is applying a delay between attempts. The name suggests a crash, but the status describes the backoff state. It does not by itself mean the process exited with a non-zero code. A container that exits 0 under a policy that restarts it can show CrashLoopBackOff too.
The delay follows a documented pattern:
- The first restart delay is 10 seconds.
- Each following delay grows exponentially: 10, 20, 40, 80, 160 seconds, and so on.
- The delay is capped at 300 seconds (five minutes).
- The kubelet resets the backoff after the container has run successfully for 10 minutes without interruption.
These are the values in the Kubernetes Pod Lifecycle documentation for the platform’s behavior. They are not measurements taken from the 39,352-restart incident, and they should not be applied to Docker or other platforms without checking their own documentation.
How Kubernetes restart policies treat exit 0 and non-zero exits
The Pod-level restartPolicy applies to app containers and to regular init containers. The Kubernetes Pod Lifecycle documentation states this directly. The page’s policy comparison, summarized below, shows how each value treats a successful exit.
What’s actually slowing this PC down?
Pick the symptom - the matching free tool is one click away.
Rank #2
- ADJUSTABLE DEPTH: 4-Post 42U open frame server rack with 4 vertical rails and adjustable mounting depth 22" to 40" (56,0cm to 101,7cm); Compatible with various servers / switches / data / AV and other IT equipment; EIA/ECA-310-E Compliant
- EASY ASSEMBLY: Mobile network rack with easy-to-follow assembly instructions and online video; Compact flat-pack shipping to avoid damage and facilitate installation; Total product height of 80.3in (204 cm) with casters, 78in (198cm) without casters
- COLD ROLLED STEEL: Durable 4 Post 19in open frame rack designed for ventilation with 42U mounting height and 1320lb (600kg) weight capacity (stationary); 3 install options included: casters, levelling feet, or base-plate to secure rack to the floor
- HARDWARE INCLUDED: Rolling computer/data rack includes cage nuts and screws to mount equipment, easy to read Units (U) and depth adjustment markings, cable management hooks for organization, and required assembly tools
- THE IT PRO'S CHOICE: Designed and built for IT Professionals, this 42U rack is backed for 2-years, including free lifetime 24/5 multi-lingual technical assistance
| restartPolicy | Container exits with 0 (success) | Container exits with non-zero (failure) | Typical use |
|---|---|---|---|
Always |
Restarts | Restarts | Long-running services that should stay up |
OnFailure |
Does not restart | Restarts | Finite work that should retry errors |
Never |
Does not restart | Does not restart | Finite work that should run once |
The Kubernetes page also lists sidecar containers in its comparison, where a successful exit restarts the container. If your Pod uses sidecars, check that row of the official table before assuming the three rules above cover them.
Under Always, a process that finishes its work and exits 0 will be restarted on every cycle. That is the intended behavior for a service, and a misconfiguration for a batch task.
Diagnosing a container with a high restart count and clean exits
Work through the following checks in order. Each one narrows whether the problem is the policy, the workload, or the environment.
Rank #3
- Adjustable Depth: 23-40'' adjustable depth is used for servers and network equipment, ensuring enough space for AV equipment, components, and cabling, while allowing you to access ports and equipment from multiple sides.
- Strong Load Capacity: Ground-Mounted Load Capacity: 500 lbs, Wall-Mounted Load Capacity: 150 lbs. The av rack is made of carbon steel for better weldability performance and can help save space while meeting your need to place multiple devices.
- User-friendly Design: Ergonomic design makes the open frame av rack easier to use. The additional top panel is able to place other items with more available space. Roller design moves anywhere and anytime, is convenient, and is more energy-saving.
- Complete Accessories: We provide the accessories you need, including 2 x Pallets, 145 x M5*10 Cross Head Screws, 4 x Casters, 4 x M10*50 Expansion Screws,10 x M6*12 Cage Nuts, 1 x Grounding Wire, 1 x User Manual.
- Wide Application: The server rack wall mount maximizes the use of available space, suitable for retail venues, classrooms, offices, and other places where space is limited.
- Confirm the restart policy. Run
kubectl get pod <pod-name> -o jsonpath='{.spec.restartPolicy}'. If the output isAlways, a clean exit will trigger another run. If it isOnFailureorNeverand the container still restarts, check whether a controller such as a Deployment or a Job is creating new Pods. - Read the last termination state. Run
kubectl describe pod <pod-name>and find theLast Stateblock for the container. Look at the reason, the exit code, and the start and finish timestamps. A reason ofCompletedwith exit code 0 confirms a clean exit. The timestamps show how long each run lasted. - Check recent events. The same
describeoutput includes the Events section. Look for probe failures, image pull problems, scheduling changes, or messages from the kubelet about backoff. - Read the application logs from the previous run. Run
kubectl logs <pod-name>for the current run and add--previousto read the output of the run that just ended. A clean exit often leaves a message, such as a completed task or a missing configuration that was silently skipped. - Ask whether the process should stay alive. If the container runs a script, a one-shot command, or a process that forks into the background, it will exit 0 almost immediately and be restarted. A service needs its main process in the foreground.
- Check configuration inputs. Confirm that environment variables and mounted files exist and contain the expected values. A process that finds no work to do may exit 0 without signaling a problem.
- Rule out probes and resource limits. Liveness and startup probes that fail will terminate the container with a non-zero or unexpected outcome, so review them. An exit code of 0 makes an out-of-memory kill unlikely, because that kill typically reports a non-zero code. Still, check resource limits against actual usage.
The restart count and the exit code cannot identify the root cause on their own. Use the logs and events to determine why each run ended.
Windows Errors? Fix Them Before They Spread
Repair common Windows errors and clear accumulated junk for a smoother, more stable PC - no reinstall needed.Free scan · no reinstallOutdated Drivers Are Slowing You Down
One free scan finds every outdated or missing driver and matches the right update for your exact hardware.Free scan · exact hardware matchChoosing the right workload type for finite and long-running work
Most restart loops of this kind come from a mismatch between the workload and the controller. The workload type determines which restart policy is appropriate.
Long-running services
A service is meant to keep running. Under a Deployment, Pods use restartPolicy: Always. If the process exits cleanly, the platform restarts it, which fits a service that should never stop. If the service exits cleanly on its own, the cause is usually in the application, not the policy.
Rank #4
- Universal 19” Rack Mount Compatibility – Perfect for pro audio, video, IT, and network gear. Compatible with mixers, routers, patch panels, servers, power amps, and more.
- Heavy-Duty Load Capacity – Built to support up to 550 lbs. Ideal for studio gear, DJ setups, server equipment, and AV components that demand serious stability.
- Robust Steel Frame & Design – Made with 1.5mm thick steel and weighs 36 lbs for maximum durability, reduced vibration, and long-term reliability in any setting.
- Mobile & Secure – Preinstalled with 3” industrial-grade caster wheels (lockable), making it easy to move and position your rack exactly where you need it.
- All-In-One Setup Kit Included – Comes with 34 rack screws (5mm & 6mm), a 1U blank spacer, and an assembly tool—ready for fast installation out of the box.
Finite tasks that should retry on error
Use a Job with restartPolicy: OnFailure. A successful exit completes the work and the container is not restarted. A non-zero exit restarts it. Jobs also have their own retry limit, set through backoffLimit, which governs how many times the Job creates new Pods after failures. That limit is separate from the Pod-level restart behavior, and both should be reviewed together.
Finite tasks that should run once
Use restartPolicy: Never for work that must not repeat within the same Pod. A Job controller may still create replacement Pods under its own retry rules, so the Pod policy alone does not guarantee that the task runs only once.
Do these 3 things before closing this tab:
1Clear out junk files and repair common Windows errors2Scan for outdated or missing drivers - takes under a minute3Repair Windows errors before they cause bigger problemsDocker restart policies
If the container is managed by Docker rather than Kubernetes, the restart rules are different. Docker’s restart policy is set with the --restart flag. Docker documents the following values:
Best Value
- Adjustable Depth: Depth adjustable from 23" to 40", this open frame server rack accommodates servers and network equipment while providing ample space for A/V gears and cable management. Enjoy easy access to ports and devices from multiple angles.
- High Weight Capacity: Supports up to 300 lbs on the floor (200 lbs when adjusted to maximum depth) and 200 lbs when wall-mounted (depth cannot be adjusted in wall-mounted mode). Made from carbon steel for superior welding performance and durability, this open frame rack is designed to save space while accommodating multiple devices.
- User-Friendly Design: Designed with your convenience in mind, this open frame server rack features an top shelf for extra storage and improved space utilization. The rolling casters let you move it effortlessly wherever you need it, making setup and movement a breeze.
- Widely Applicable: Maximize your space with this adaptable open frame server rack, designed to make the most of every inch. Ideal for retail spots, classrooms, offices, and any area where space is at a premium, it delivers practical solutions for your storage needs.
- Everything You Need: Our open-frame rack comes with fully equipped accessory kit for easy setup and secure installation: 2 x Trays, 4 x Casters, 1 x set of Screws, 16 x M6*12 Cage Nuts, 1 x Grounding Wire, 1 x Internal & External Hex Wrenches, and 1 x User Manual.
no: the default. The container is not restarted.on-failure[:max-retries]: restarts only when the container exits with a non-zero code. The optionalmax-retriescaps the number of attempts.always: restarts whenever the container stops, including after a successful exit.unless-stopped: behaves likealways, but does not restart a container that was stopped manually.
Docker applies restart policies only after the container has started successfully, which Docker defines as running for at least 10 seconds. A container that exits within that window may not be restarted the way you expect. To check the configured policy, run docker inspect -f '{{.HostConfig.RestartPolicy.Name}}' <container-name>. Do not apply Kubernetes lifecycle details to Docker containers, or the reverse, without checking the documentation for the platform you use.
What this title cannot establish
The 39,352 restart count and the exit codes alone do not reveal the platform, the restart policy, the workload type, the exact command, or the reason each run ended. No public statistic or named source about this specific incident has been established. Any diagnosis of this particular event depends on the Pod or container configuration, the logs, and the event history from the affected system.
Quick Recap
“
Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.




