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

> Reference and syntax for the STOP ENGINE command.

# STOP ENGINE

Stops a running engine.

## Syntax

```sql theme={"theme":{"light":"css-variables","dark":"css-variables"}}
STOP ENGINE [IF EXISTS] <engine_name>
[WITH 
    [TERMINATE = <true/false>]]
```

## Parameters

| Parameter       | Description                                                                                                                                                                                                                        |
| :-------------- | :--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `<engine_name>` | The name of the engine to be stopped.                                                                                                                                                                                              |
| `<TERMINATE>`   | When `false`, the engine will wait for running queries to finish before stopping.<br />When `true`, the engine will stop without waiting for running queries to complete.<br /><br />If not specified, `false` is used as default. |

**Limitations:**

* When `TERMINATE=false` (default), the engine will wait for up to 24 hours for running queries to finish before stopping. After 24 hours, the engine will finish shutting down. Any queries still running may not run to completion.

If you would like to remove any of these limitations, reach out to Firebolt Support.

## Example 1

The following example waits for queries on my\_engine to finish before stopping:

```sql theme={"theme":{"light":"css-variables","dark":"css-variables"}}
STOP ENGINE my_engine
```

## Example 2

The following example stops my\_engine without waiting for running queries to finish:

```sql theme={"theme":{"light":"css-variables","dark":"css-variables"}}
STOP ENGINE my_engine WITH TERMINATE=true
```
