Fix it now
40544’s published text is that the database has reached its size quota, and it suggests partitioning or deleting data or dropping indexes. The rest of the 4055x family reports the same thing about log, tempdb, memory and transaction duration. None has a configuration workaround, because the limit is the product you are paying for.
SELECT name, size / 128.0 AS current_size_mb,
CASE max_size WHEN -1 THEN NULL ELSE max_size / 128.0 END AS max_size_mb
FROM sys.database_files;
SELECT SUM(reserved_page_count) * 8.0 / 1024 AS reserved_mb
FROM sys.dm_db_partition_stats;
- Read the number, not the text: 40544 is data size, 40552 log, 40551 tempdb, 40553 memory, 40550 too many locks, 40549 a long-running transaction, 10929 the instance being too busy under load.
- For a storage quota, free real space first: drop indexes nothing reads, then archive or delete cold rows in bounded batches so the log never holds the whole operation.
- Raise the quota if the tier allows it with
ALTER DATABASE CURRENT MODIFY (MAXSIZE = 1024 GB);, or change the tier withALTER DATABASE CURRENT MODIFY (SERVICE_OBJECTIVE = 'GP_Gen5_8');. Valid MAXSIZE values depend on the tier. - In an elastic pool, check the pool’s storage before the database’s. A database under its own quota still fails when the pool is full.
MAXSIZE does not apply to single databases in the Hyperscale tier, which grow as needed. If that is where you are, this error is not the one you have.
If the write that failed now succeeds, you are done. If it comes back next week, the next section explains which allowance you are actually against.
Why it happens
A database in the platform service is not sitting on a disk you own. Every service objective carries a fixed set of allowances: a maximum data size, a log ceiling derived from it, a tempdb allocation, a memory allocation, worker and session counts and an I/O rate. Those allowances are the product definition. When the engine reaches one it does not degrade gracefully; it refuses the operation and names the resource.
That is the important difference from an instance you run yourself. On your own server a full data file grows into free space on the volume. Here the file has a hard maximum written into the service objective, so 40544 appears while the underlying storage still has room. The log behaves the same way, which is why a single transaction modifying more rows than the tier’s log can hold will fail however long you wait. Batching large deletes matters far more here than it does on-premises.
The session-kill codes are worth reading literally, because each names the remedy in its own text. 40552 says the session was terminated because of excessive transaction log space usage and to modify fewer rows in a single transaction. 40551 says excessive tempdb usage, and to reduce the temporary table space the query uses. 40553 says excessive memory usage, and to process fewer rows. 40550 says too many locks were acquired, and to read or modify fewer rows in a single transaction. 40549 says the transaction was long-running and to shorten it.
Error 10929 sits slightly apart. It reports governance at the instance level rather than a quota on your database: the request asked for more than its minimum guarantee and the shared instance had none to give. Its text names the minimum guarantee, the maximum limit and the current usage, so it tells you where you sit. Retry it with backoff, because unlike a size quota it is transient – but if it appears constantly rather than at peaks, the workload has outgrown its tier.
The data really has reached the maximum size
You have this one if Reserved space sits within a whisker of the file maximum; every insert fails while selects still work.
- Find where the space went by ordering
sys.dm_db_partition_statson reserved page count per object and reading the top ten. - Drop indexes with no reads recorded in
sys.dm_db_index_usage_stats. Unused non-clustered indexes are often a large share of a full database. - Delete or archive cold rows in bounded batches with a TOP clause and a loop, committing each batch so the log never holds the whole operation.
Deleting rows does not return space to the quota on its own. Pages stay allocated to the object until the index is rebuilt or the file shrunk, and a rebuild needs free space of its own, so work in stages.
The elastic pool is full, not the database
You have this one if The database reports space to spare, but writes still fail with 40544.
- Check the pool’s used and maximum storage rather than the database’s. Elastic pool limits are published separately from single-database limits.
- Identify which database grew. One noisy tenant fills a pool for everyone in it.
- Free space in that database, raise the pool’s storage allowance, or move it out of the pool onto its own service objective.
One transaction is too big for the tier’s log
You have this one if 40552, or a log-full failure, on a bulk delete, update or import, while ordinary traffic is unaffected.
- Break the statement into batches: modify a bounded number of rows per iteration, commit, repeat.
- Watch
sys.dm_db_log_space_usagewhile the job runs so you can size the batch to the tier rather than guess. - Take the same approach for 40550, which is the lock-count version of the same mistake.
tempdb or memory limits are hit by one query
You have this one if 40551 or 40553, always on the same report or overnight job, and always at roughly the same point in it.
- Get the execution plan and look for the sort or hash spill consuming tempdb.
- Index so the largest sort disappears, and update statistics so the grant estimate is realistic.
- Carry fewer rows: filter earlier, avoid selecting every column into temporary tables, and avoid ordering data you are about to aggregate.
The instance is throttling you rather than the database
You have this one if 10929, at peaks rather than constantly, and the message quotes a minimum guarantee, a maximum limit and current usage.
- Retry with exponential backoff. This one is explicitly transient and retrying is the documented response.
- If it appears constantly, read
sys.dm_db_resource_stats, which records 15-second rows and keeps about an hour of history, and check whether any metric is pinned. - A workload that always runs at the ceiling has outgrown its tier, and no amount of retrying changes that.
Full reference
Match the code to the resource
| Code | Resource exhausted | Does retrying help? |
|---|---|---|
| 40544 | Data size, against the database or pool maximum | No |
| 40549 | A transaction held open too long; the session was killed | Yes, once committed in smaller units |
| 40550 | Too many locks acquired by one session | Only with fewer rows per transaction |
| 40551 | tempdb space used by one session | Only with fewer sorts and spills |
| 40552 | Transaction log space used by one session | Only with a smaller transaction |
| 40553 | Memory used by one session | Only by processing fewer rows |
| 10929 | Instance-level resource governance under load | Often, with backoff |
Changing the allowance
ALTER DATABASE CURRENT MODIFY (MAXSIZE = 1024 GB);
ALTER DATABASE CURRENT MODIFY (SERVICE_OBJECTIVE = 'GP_Gen5_8');
ALTER DATABASE [db1] MODIFY (EDITION = 'Premium', MAXSIZE = 1024 GB, SERVICE_OBJECTIVE = 'P15');
MAXSIZE takes values from a documented set that depends on the service tier – 100 MB, 250 MB, 500 MB, 1 GB and upwards, with the larger values only available on the higher tiers – so check what your tier permits rather than picking a round number. Service objectives come in two shapes: DTU names such as S3 or P6, and vCore names such as GP_Gen5_8 for General Purpose provisioned compute with eight vCores, or HS_Gen5_8 for Hyperscale. MAXSIZE does not apply to single Hyperscale databases at all.
Measuring before changing anything
SELECT TOP 10 OBJECT_NAME(object_id) AS ObjectName,
SUM(reserved_page_count) * 8.0 / 1024 AS reserved_mb
FROM sys.dm_db_partition_stats
GROUP BY object_id
ORDER BY reserved_mb DESC;
SELECT * FROM sys.dm_db_log_space_usage;
SELECT TOP 20 end_time, avg_cpu_percent, avg_data_io_percent,
avg_log_write_percent, avg_memory_usage_percent,
max_worker_percent, max_session_percent
FROM sys.dm_db_resource_stats
ORDER BY end_time DESC;
sys.dm_db_resource_stats returns one row every 15 seconds and keeps roughly an hour of history, with each figure expressed as a percentage of the service tier’s limit. That is the view that tells you whether you are near a ceiling continuously or only at peaks, and it is the difference between a tuning problem and a tier that is too small. It is available in Azure SQL Database and SQL database in Microsoft Fabric, and is not supported in Azure SQL Managed Instance.
Batching a large delete so the log survives it
- Decide a batch size small enough that the tier’s log can hold one iteration. Start conservatively and watch sys.dm_db_log_space_usage.
- Delete with a TOP clause inside a loop, committing each iteration, and exit when the row count reaches zero.
- Keep the batch inside its own transaction. A loop inside one long transaction is the same mistake in a different shape and will raise 40552 or 40549.
- Rebuild the affected indexes afterwards to return the freed pages, and expect the rebuild itself to need space.
- Where the deletion is routine, consider partitioning so the work becomes a switch rather than a delete.
Which of these to retry, and which not to
- Retry 10929 and 40549 with backoff. Both are transient by nature.
- Do not blindly retry 40544, 40550, 40551, 40552 or 40553. They fail identically until the underlying usage changes, and a retry loop just multiplies load on a service that is already at a limit.
- Build the distinction into the application’s retry policy rather than into an operator’s habits.
- Log the incident ID that 40544 carries. It is in the message text and is what support will ask for.
Do not scale the service objective as a reflex during an incident. Scaling moves the database and causes a brief disconnection, and any session in the middle of a transaction loses it.
When a licence is the actual fix
There is a point where paying for more platform capacity every month stops making sense, particularly for a database whose size grows steadily while its CPU demand does not. An instance you license yourself has no service-tier quota: the size ceiling is effectively the storage you attach, and the binding limits become the edition’s own – for SQL Server 2025 Standard that is 256 GB of buffer pool per instance and a compute cap of the lesser of 4 sockets or 32 cores, with 32 GB each for columnstore segment cache and memory-optimised data. That is a different trade rather than automatically a better one, because patching, backups and high availability become your job again. Arco supplies SQL Server 2025 Standard in 2-core packs and will help you weigh the licence quantity against the tier you are being pushed towards. If you hold licences with active Software Assurance, ask about Azure Hybrid Benefit before you decide either way.
Every code this article covers
| Code | What it points at | Source |
|---|---|---|
40544 |
The database has reached its size quota; the message suggests partitioning or deleting data or dropping indexes, and carries an incident ID | Microsoft Learn |
40549 |
The session was terminated because of a long-running transaction; shorten the transaction | Microsoft Learn |
40551 |
The session was terminated because of excessive tempdb usage; reduce the temporary table space the query uses | Microsoft Learn |
40552 |
The session was terminated because of excessive transaction log space usage; modify fewer rows in a single transaction | Microsoft Learn |
40553 |
The session was terminated because of excessive memory usage; process fewer rows | Microsoft Learn |
10929 |
The server is too busy to support a request above the stated figure for this database; the message quotes the minimum guarantee, the maximum limit and current usage | Microsoft Learn |
Confirm the fix worked
- Re-run the space queries and confirm reserved space is comfortably below the file maximum rather than marginally below it.
- Run the write that used to fail and confirm it completes.
- In an elastic pool, confirm the pool’s used storage has headroom, not just the database’s.
- Watch
sys.dm_db_resource_statsacross a peak and confirm no metric is pinned at its ceiling. - Run the batched job again and confirm
sys.dm_db_log_space_usagestays flat rather than climbing to the limit.
Questions people ask about this
Can I turn the size quota off?
No. It belongs to the service objective. Raise MAXSIZE within what the tier permits, or move to a tier that allows more. No setting or support request removes it, and it does not apply at all to single Hyperscale databases, which grow as needed.
Why does space not come back after I delete rows?
Deleted rows free space inside the index, but the pages stay allocated to the object. Rebuild the index or shrink the file to return it to the quota. Rebuilds need free space themselves, so work in stages.
Which of these errors should the application retry?
Retry 10929 and 40549 with backoff, since both are transient. Do not blindly retry 40544, 40550, 40551, 40552 or 40553: they fail identically until the underlying usage changes, and the loop just multiplies load.
The database has room but writes still fail. What now?
Check the elastic pool. Pool storage is a separate allowance from the database’s own, and one database growing fills the pool for every database in it.
Is a licensed SQL Server cheaper than a bigger tier?
It depends on the shape of the workload. A large but quiet database usually looks better on a licensed instance; a small one with spiky demand usually looks better on the platform service. Work out the licence quantity honestly, against the cores you would actually run on, before comparing.
