> For the complete documentation index, see [llms.txt](https://mariadb.com/docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://mariadb.com/docs/server/reference/error-codes/mariadb-error-codes-3000-to-3099/e3024.md).

# Error 3024: Query execution was interrupted, maximum statement execution time exceeded

| Error Code | SQLSTATE | Error         | Description             |
| ---------- | -------- | ------------- | ----------------------- |
| 3024       | HY000    | ER\_UNUSED\_1 | You should never see it |

## Possible Causes and Solutions

The cause is that the executing statement took more than [max\_statement\_time](/docs/server/server-management/variables-and-modes/server-system-variables.md#max_statement_time) (primary) or [slave\_max\_statement\_time](/docs/server/ha-and-performance/standard-replication/replication-and-binary-log-system-variables.md#slave_max_statement_time) (replica) to execute.

To fix this, you have to either increase the value of [max\_statement\_time](/docs/server/server-management/variables-and-modes/server-system-variables.md#max_statement_time) or find out [why the query is slow](/docs/server/ha-and-performance/optimization-and-tuning/query-optimizations.md). Start by doing an [EXPLAIN](/docs/server/reference/sql-statements/administrative-sql-statements/analyze-and-explain-statements/explain.md) or [ANALYZE](/docs/server/reference/sql-statements/administrative-sql-statements/analyze-and-explain-statements/analyze-statement.md) on the query to find out how the query is executed.

## See Also

* [Aborting Statements that Exceed a Certain Time to Execute](/docs/server/ha-and-performance/optimization-and-tuning/query-optimizations/aborting-statements.md)

{% hint style="success" %}
This article doesn't currently contain any content. [You can help!](/docs/general-resources/about/readme/contributing-documentation.md)
{% endhint %}

<sub>*This page is licensed: CC BY-SA / Gnu FDL*</sub>

{% @marketo/form formId="4316" %}
