﻿---
title: Troubleshooting ES|QL
description: Resources for troubleshooting ES|QL issues, including query logging, task management, circuit breaker settings, and support case details.
url: https://www.elastic.co/elastic/docs-builder/docs/3562/reference/query-languages/esql/esql-troubleshooting
products:
  - Elasticsearch
applies_to:
  - Elastic Cloud Serverless: Generally available
  - Elastic Stack: Generally available
---

# Troubleshooting ES|QL
This section provides some useful resource for troubleshooting ES|QL issues:
- <applies-to>Elastic Stack: Preview since 9.4</applies-to> <applies-to>Elastic Cloud Serverless: Unavailable</applies-to> [Query logging](https://docs-v3-preview.elastic.dev/elastic/docs-builder/docs/3562/deploy-manage/monitor/logging-configuration/query-logs): Log all query types, including ES|QL, with a managed data stream (recommended)
- [Legacy ES|QL query log](https://www.elastic.co/elastic/docs-builder/docs/3562/reference/query-languages/esql/esql-query-log): Log ES|QL queries using the older `esql.querylog` settings
- [Task management API](https://www.elastic.co/elastic/docs-builder/docs/3562/reference/query-languages/esql/esql-task-management): Learn how to diagnose issues like long-running queries.
- [Circuit breaker settings](/elastic/docs-builder/docs/3562/reference/elasticsearch/configuration-reference/circuit-breaker-settings#circuit-breakers-page-esql): Learn how ES|QL uses the circuit breaker and how to configure it. For circuit breaker errors, see [Circuit breaker errors](https://docs-v3-preview.elastic.dev/elastic/docs-builder/docs/3562/troubleshoot/elasticsearch/circuit-breaker-errors).

For tips on writing efficient queries, refer to [Optimize ES|QL query performance](https://www.elastic.co/elastic/docs-builder/docs/3562/reference/query-languages/esql/esql-query-performance).

## Filing a support case

When filing a support case for a slow or failing ES|QL query, include the following information so the support team can investigate quickly:
- The full ES|QL query text
- The cluster version, available from `GET /`
- The index pattern and approximate document count
- The time range covered by the query
- The fields and field types across all indices participating in the query, available from the [field capabilities API](https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-field-caps)
- The `took` value from the response
- Any error messages
- A query log entry, if [query logging](https://www.elastic.co/elastic/docs-builder/docs/3562/reference/query-languages/esql/esql-query-log) is enabled