# Quotas for Queues

How many queues and messages you can have, how fast you can call the service, and how to raise the queues quota.

(The table of quotas is generated on the web page.)
Creating a queue over the **Queues** quota is refused with `409` and code `QuotaExceeded`; the
message starts "Quota exceeded:" and names the quota, the limit and how many are in use (from an
SQS client: `OverLimit`). Dead-letter queues count as queues.

The other three quotas are checked on every send and receive, and refused with `403` and code
`OverLimit` (see [Send messages](send-messages.md) and
[Receive and delete messages](receive-and-delete-messages.md)). They are checked against counts a
few seconds old, so a burst can go slightly over before requests are refused.

## Request limits

| Limit                                    | Value                      |
| ---------------------------------------- | -------------------------- |
| Message size, body plus attributes       | 256 KiB (262,144 bytes)    |
| Messages per batch and per receive       | 10                         |
| Size of a send batch                     | 256 KiB                    |
| Attributes per message                   | 10                         |
| Requests per second per organization     | 100, with bursts up to 300 |
| Long polls open at once per organization | 50                         |

The request rate and the long polls are counted by each of the platform's servers on its own (see
[Where your messages are kept](where-messages-are-kept.md)). Over the rate, a request is refused
with `429`, code `Throttling` and a `Retry-After` header (from an SQS client: `RequestThrottled`).
Batching helps: one request can send, receive or delete 10 messages.

## Raise the queues quota

1. Open **Service quotas** in the Deutsche Cloud Console.
2. On the **Queues** row, in its actions menu, choose **Request increase**.
3. In **Request a quota increase**, for **New value**, enter the value you need: more than the
   current value, and at most 1,000.
4. For **What you need it for**, enter the reason (10 characters or more), then choose **Send
   request**.

This needs `quotas:RequestServiceQuotaIncrease`; without it **Request increase** is unavailable
("Needs quotas:RequestServiceQuotaIncrease"), as it is while a request for the quota is open ("A
request is already open"). The message and storage quotas are fixed ("This limit is fixed").

For an organization on standard quotas, a request for up to twice the default is approved at once,
unless a request for this quota was approved that way in the last 24 hours. Every other request is
decided by Deutsche Cloud staff, and you get an event when they decide.

A request is refused with `400` when it asks for no more than the current value or for more than
1,000 (for more, contact Deutsche Cloud support), and while another request for the quota is open (`409` "A request for this quota is already open; cancel it to ask
for a different value").

## Related

- [Send messages](send-messages.md)
- [Where your messages are kept](where-messages-are-kept.md)
