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

# Limits and error codes

> Sizes, rates, retention and the error codes the Queues API returns when a limit is reached.

> [!TIP]
>
> **Live.** This area is documented as current, user-reliable behavior.

## Goal

Know the limits before you design around a queue, and what each error means.

## Prerequisites

* A queue

## Workflow

**Step 1**

Check message and batch sizes against the limits below.

**Step 2**

Handle 429 and 507 in your sender with backoff.

**Step 3**

Handle 409 queue\_delivery\_paused in pull workers by waiting.

## Limits

* Message size: 128 KB.
* Batch send: 100 messages and 256 KB in total.
* Delay: up to 86,400 seconds (24 hours).
* Retention: 1 hour to 14 days, default 4 days.
* Backlog: 25 GB per queue.
* Throughput: 5,000 messages a second per queue.
* Pull batch: up to 100 messages. Visibility timeout: up to 12 hours.
* Max retries: up to 100.
* Consumer concurrency: auto, or 1 to 250 batches in flight.

## Error codes

* 413 message\_too\_large: a message is over 128 KB.
* 429 queue\_rate\_limited: more than 5,000 messages a second on this queue. Retry with backoff.
* 507 queue\_full: the backlog reached 25 GB. Drain or purge the queue.
* 409 queue\_name\_ambiguous: the queue name exists in more than one of your projects. Pass the queue id or \<project\_id>:\<name>.
* 409 queue\_delivery\_paused: a pull on a paused queue.
* A pull token used on another queue, or for anything other than pull and ack, is refused.

## Expected result

> [!TIP]
>
> Your senders and workers handle every limit error without losing messages.

## Related guides

> [card] [Send messages](https://docs.stackshift.cloud/queues/send-messages.md)
>
> Send one message or a batch of up to 100 from the SDKs, the CLI or the API, as JSON, text or bytes, with an optional delay and idempotency key.

> [card] [Pull consumers](https://docs.stackshift.cloud/queues/pull-consumers.md)
>
> A worker anywhere pulls a batch over HTTP, leases the messages for a visibility timeout, then acks or retries each one by lease id.

> [card] [Pricing](https://docs.stackshift.cloud/queues/pricing.md)
>
> Queues are billed by operations: each 64 KB written, read or deleted.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.