> ## Documentation Index
> Fetch the complete documentation index at: https://docs.stackshift.cloud/llms.txt
> Use this file to discover all available pages before exploring further.

# Restarts and alerts

> StackShift restarts a service that stops and tells you when it runs out of memory or keeps crashing. Nothing fails quietly.

> [!TIP]
>
> **Live.** This area is documented as current, user-reliable behavior.

## Goal

Know what StackShift does when a service stops, and when you are told.

## Prerequisites

* A deployed project.

## Workflow

**Step 1**

Open Project, Metrics. The live strip shows the real state of each service.

**Step 2**

If a service is crashing, read the headline, for example Crashing, out of memory.

**Step 3**

Choose Raise memory to change the size, or View logs to see what the app did before it stopped.

**Step 4**

Check your email or the in-app notices for the alert.

## Restart supervision

* When a service stops, StackShift starts it again. The wait between restarts grows from 1 second up to 30 seconds.
* The state shows what happened last: Restarted, out of memory (for 30 minutes after the kill) or Restarted after a crash.
* The restart count on each service is real, so you can see how often it restarted.

## Stopped restarting after 5 crashes

If a service crashes 5 times in a row, each within 2 minutes of starting, StackShift stops restarting it. This is a crash loop.

The service shows Stopped restarting after 5 crashes, or after 5 out-of-memory crashes when memory was the cause, with Raise memory and View logs buttons. It stays stopped until you fix the cause and deploy or restart it. A crash loop clears when the service leaves that state.

## Alerts

* Out of memory: an email and an in-app notice right away, for example: worker ran out of memory (512 MB). Restarted. It resolves 30 minutes after the last kill.
* Crash loop: the same, marked urgent.
* Likely memory leak: one quiet notice a day, by email and in-app, while the climb continues. It links to Find what’s growing.
* Alerts and the 80 and 95 percent memory warnings use app memory, so file cache never causes a false alarm.
* There is one open alert per service and type, so a loop does not flood you.
* Each email has one View memory button that opens Project, Metrics, Memory.

## Expected result

> [!TIP]
>
> A service that stops is restarted, and you hear about out-of-memory kills and crash loops the moment they happen.

## Related guides

> [card] [The performance page](https://docs.stackshift.cloud/performance/overview.md)
>
> Project, Metrics shows how your project is doing right now and over the last 7 days: memory, speed, page load, processor, disk, network and database, with what to change.

> [card] [Change memory](https://docs.stackshift.cloud/performance/change-memory.md)
>
> Pick a memory size for a service. StackShift marks the size that fits what it measured and shows the price difference.

> [card] [Find a memory leak](https://docs.stackshift.cloud/performance/find-a-memory-leak.md)
>
> When memory climbs and only drops on restart, use the leak guide for your runtime. Node.js can take a memory snapshot from the dashboard.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.