# Manage memory

Set memory budgets and handle resource errors without treating limits as performance targets.

Source: https://particledb.ai/operations/memory/

## Configure budgets

Use the settings supported by the installed server:

| Setting | Purpose |
|---|---|
| `--max-server-memory` | Overall server memory ceiling |
| `--max-statement-memory` | Per-statement memory budget |
| `--row-store-memory-limit` | Row-store allocation limit |

Run `particledb start --help` to check accepted units and default values. Leave room for the operating system and other services.

## Understand resource errors

A statement that exceeds a resource limit can fail with an out-of-memory error. Roll back an aborted transaction before reusing the connection. Repeating the same oversized query immediately may fail again.

## Reduce pressure

Read fewer columns, apply selective filters, avoid unbounded joins and write in bounded batches. Check record size, concurrency and grouping cardinality before raising the limit.

## Test safely

Exercise resource errors only on a disposable instance. Do not run deliberate memory-exhaustion examples on a shared server.

[Performance](/guides/query-performance/) · [Monitoring](/operations/monitoring/)

## Related

[Documentation home](/docs/) · [Troubleshooting](/guides/troubleshooting/)
