---
metadata:
  - name: generator
    content: Diplodoc Platform v5.50.6
alternate:
  - https://ydb.tech/docs/en/troubleshooting/spilling/total-size-limit-exceeded.md
  - https://ydb.tech/docs/ru/troubleshooting/spilling/total-size-limit-exceeded.md
sourcePath: en/core/troubleshooting/spilling/total-size-limit-exceeded.md
---
> **Documentation Index:** Fetch the complete configuration index at https://ydb.tech/docs/en/llms.txt

# Total Size Limit Exceeded

The maximum total size of spilling files has been exceeded (parameter [`max_total_size`](https://ydb.tech/docs/en/reference/configuration/table_service_config.md#local-file-config-max-total-size)). This occurs when the total size of all spilling files reaches the configured limit, preventing new spilling operations.

## Diagnostics

Check the current spilling usage:

- Monitor the total size of spilling files in the spilling directory.
- Check the current value of the `max_total_size` parameter.
- Review available disk space in the spilling directory location.
- Check if there are any stuck spilling files that should have been cleaned up.

## Recommendations

To resolve this issue:

1. **Increase the spilling size limit:**
   - If there is sufficient free disk space, increase the [`max_total_size`](https://ydb.tech/docs/en/reference/configuration/table_service_config.md#local-file-config-max-total-size) parameter in the configuration.
   - Increase the value by 20–50% from the current one.

2. **Expand disk space:**
   - If there is insufficient free disk space, add additional disk space.
   - Ensure that the spilling directory is located on a disk with sufficient capacity.

3. **Try repeating the query:**
   - Wait for other resource-intensive queries to complete.
   - Repeat the query execution during less busy times.
