Skip to content

Est. 2011ยทMicrosoft Partner ID 7033487ยทDelivery under 3 minยทSupport 7 days a week

Your vault is empty.

License Error 17300

Error 17300 and 1204: Worker and Lock Resources Exhausted on a Capped Edition

13 min read Updated October 5, 2026 SQL Server

Fix it now

17300 means the instance could not run a new system task, and its published text names two causes: insufficient memory, or the number of configured sessions exceeding the maximum allowed. 1204 means the lock manager could not obtain a lock structure. Both are exhaustion errors, and the first job is deciding whether something is holding resources or the edition simply has few of them.

Run before restarting anything; a restart destroys the evidence

SELECT scheduler_id, current_tasks_count, runnable_tasks_count,
       work_queue_count, active_workers_count, current_workers_count
FROM sys.dm_os_schedulers WHERE status = 'VISIBLE ONLINE';

SELECT type, pages_kb / 1024.0 AS mb FROM sys.dm_os_memory_clerks
WHERE type = 'OBJECTSTORE_LOCK_MANAGER';
  1. If you cannot connect at all, use the dedicated administrator connection from a session on the server itself: sqlcmd -A -d master. It is local-only unless remote admin connections has been enabled, and only one is allowed at a time.
  2. A high runnable_tasks_count with a non-zero work_queue_count means tasks are queued for workers that do not exist. Confirm with the THREADPOOL wait type in sys.dm_os_waiting_tasks.
  3. Follow 17300’s own advice as well as the worker angle: check user connections with sp_configure, and count sessions with sys.dm_exec_sessions.
  4. Find the head of the blocking chain rather than its victims: the oldest request that nothing is blocking, plus DBCC OPENTRAN.
  5. For 1204, group sys.dm_tran_locks by session to find who holds hundreds of thousands of locks, then check the edition’s compute and memory caps against what the machine has.

Restarting the instance clears the symptom and destroys everything you need to tell a blocking chain from an edition ceiling. Capture the scheduler, session and lock output first.

If the queue drains and stays drained, you are done. If it refills, the next section explains where the pool sizes come from.

Why it happens

SQL Server does not give every connection a thread. It runs a pool of workers across a set of schedulers, one visible scheduler per logical processor the instance may use, and lends a worker to a task only while that task has work to do. Unless max worker threads has been set by hand, the pool is computed at startup from the processor count, using the documented formula: default max workers plus (logical CPUs minus 4) times workers per CPU. On a 64-bit machine that is 512 for four processors or fewer, 576 at eight, 704 at sixteen, 960 at thirty-two.

Fewer processors therefore means fewer workers, and the edition decides how many processors the instance sees at all. Microsoft publishes Express as the lesser of 1 socket or 4 cores. Standard is the lesser of 4 sockets or 32 cores on SQL Server 2025, and the lesser of 4 sockets or 24 cores on SQL Server 2022 and earlier. Web, which exists up to SQL Server 2022 and is absent from the SQL Server 2025 editions table entirely, is the lesser of 4 sockets or 16 cores. A workload that would spread across a 48-core server is squeezed onto the licensed subset.

17300’s published text is broader than worker exhaustion alone, and reading it in full changes what you check. It says the instance was unable to run a new system task either because there is insufficient memory or because the number of configured sessions exceeds the maximum allowed, and it tells you to verify memory, to check user connections with sp_configure, and to use sys.dm_exec_sessions to count sessions including user processes. Do all three rather than only the first.

Lock memory reaches a similar place by a different road. The lock manager builds a structure for every lock it grants and grows dynamically: with the locks option at its default of 0 it starts with a pool of 2,500 lock structures and acquires more as needed, but the dynamic pool will not exceed 60 per cent of the memory allocated to the engine. Past that, or when the machine has nothing left, further lock requests raise 1204. Since the edition caps how much memory the engine may commit, it caps the lock manager with it.

A blocking chain is holding every worker

You have this one if THREADPOOL waits everywhere, a long list of sessions blocked directly or indirectly by one session, and that session has an open transaction with no active request.

  1. Identify the head of the chain. A session with an open transaction and a sleeping status is almost always an application that opened a transaction and never committed.
  2. Understand what it has modified before you act, then kill it and watch the queue drain.
  3. Fix the application’s transaction handling, because a bigger worker pool only buys a longer queue.

Killing the head of a chain triggers a rollback that can take as long as the work it undoes. Plan for that rather than being surprised by it.

A statement takes an enormous number of fine-grained locks

You have this one if 1204 during one large update, delete or index operation, with OBJECTSTORE_LOCK_MANAGER holding a large and growing amount of memory.

  1. Batch the statement so it modifies a bounded number of rows per transaction.
  2. Check whether escalation was disabled: SELECT name, lock_escalation_desc FROM sys.tables;
  3. Return it to the documented default with ALTER TABLE dbo.YourTable SET (LOCK_ESCALATION = TABLE); unless it was disabled deliberately.

TABLE is the default, not AUTO. AUTO lets escalation go to partition level on a partitioned table, which is a deliberate choice rather than a restoration of normal behaviour.

Parallelism consumes workers faster than you expect

You have this one if A modest session count, but sys.dm_os_tasks shows many tasks per session and the exhaustion coincides with reporting queries.

  1. Remember a parallel query consumes several workers per branch of its plan, so ten of them at a high degree of parallelism can occupy hundreds.
  2. Set max degree of parallelism to something appropriate for the machine rather than leaving it at 0.
  3. Raise cost threshold for parallelism well above its very low default so trivial queries stop going parallel at all.

Too many sessions rather than too few workers

You have this one if 17300 with plenty of memory, and a session count that has grown past what anybody expected.

  1. Follow the message: check the ceiling with sp_configure 'user connections', having set show advanced options first.
  2. Count what is connected with sys.dm_exec_sessions, grouped by program name and host, and look for one application holding hundreds.
  3. Fix the pooling at the application tier. Connections held open by leaked objects consume sessions whether or not they are doing anything.

The edition ceiling is the real constraint

You have this one if Express, or Web on an older release, with the instance using far fewer cores and far less memory than the machine has, and exhaustion under a workload that is not obviously misbehaving.

  1. Confirm what the instance is allowed: compare the visible scheduler count with the machine’s logical processors, and committed memory with installed RAM.
  2. On Express, check the database size against the licensed limit as well. A workload that outgrew the worker pool has usually outgrown that too.
  3. Reduce concurrency from the application: connection pool sizing and queue depth limits buy real headroom while you decide.

Full reference

The worker pool, as documented

Logical CPUs Computed max worker threads (64-bit)
4 or fewer 512
8 576
16 704
32 960
64 1472
128 4480 (from SQL Server 2016 SP2 and SQL Server 2017)
256 8576 (from SQL Server 2016 SP2 and SQL Server 2017)

The default for the option is 0, which lets the engine compute the value at startup from that table and the formula behind it. The important consequence is that the pool follows the processors the instance is permitted to use, not the processors the machine has, so an edition cap shrinks the worker pool as a side effect of capping compute.

The compute and memory caps that size everything else

Edition Compute capacity Buffer pool per instance
Enterprise Operating system maximum Operating system maximum
Standard, SQL Server 2025 Lesser of 4 sockets or 32 cores 256 GB
Standard, 2022 and earlier Lesser of 4 sockets or 24 cores 128 GB
Web, 2022 and earlier Lesser of 4 sockets or 16 cores 64 GB
Express Lesser of 1 socket or 4 cores 1,410 MB

Web edition does not appear in the SQL Server 2025 editions table. If you are on Web and planning a move, compare against Standard rather than against a newer Web.

Getting in when nothing else will connect

The dedicated administrator connection exists for exactly this: Microsoft describes it as a special diagnostic connection for administrators when standard connections are not possible, with limited resources reserved so simple diagnostic work can still run. Two details decide whether it works for you. Only one DAC is allowed per instance, and a second attempt is refused with error 17810. And by default it is only allowed from a client running on the server itself – network connections need the remote admin connections option enabled first, which is not something you can turn on once the instance is already unreachable.

From a session on the server itself

sqlcmd -A -d master

sqlcmd -S admin:<instance_name>

The lock manager’s boundaries

  • The locks option defaults to 0, which Microsoft describes as the recommended configuration: allocate and deallocate lock structures dynamically.
  • At startup the lock manager takes an initial pool of 2,500 lock structures and acquires more as that is exhausted.
  • The dynamic pool will not exceed 60 per cent of the memory allocated to the engine. Past that, or when the machine has no memory left, lock requests generate an error.
  • So the lock ceiling moves with the memory ceiling, which moves with the edition. Setting a fixed locks value is discouraged and rarely helps.

Queries to capture before you restart anything

Schedulers, waits, locks, sessions

SELECT scheduler_id, current_tasks_count, runnable_tasks_count,
       work_queue_count, active_workers_count, current_workers_count
FROM sys.dm_os_schedulers WHERE status = 'VISIBLE ONLINE';

SELECT wait_type, COUNT(*) AS Tasks
FROM sys.dm_os_waiting_tasks GROUP BY wait_type ORDER BY Tasks DESC;

SELECT request_session_id, COUNT(*) AS Locks
FROM sys.dm_tran_locks GROUP BY request_session_id ORDER BY Locks DESC;

SELECT COUNT(*) AS Sessions, program_name, host_name
FROM sys.dm_exec_sessions WHERE is_user_process = 1
GROUP BY program_name, host_name ORDER BY Sessions DESC;

Distinguishing an edition limit from an application fault

Compare what the instance uses against what the machine has. A visible scheduler count matching the licensed core cap on a much larger server, with committed memory pinned at the edition ceiling and no single session holding anything unusual, points at the edition. Spare capacity on the machine plus one session holding a transaction for an hour points at the application, and no licence changes that. The two look identical from the error message and completely different from sys.dm_os_schedulers.

When a licence is the actual fix

If the numbers show the instance running on a fraction of the server’s cores and memory while work queues for threads and lock memory, the edition is the constraint and configuration will not move it. On SQL Server 2025, Standard raises the compute cap to the lesser of 4 sockets or 32 cores and the buffer pool to 256 GB per instance, which enlarges the worker pool and the lock manager together, and it removes the per-database size limit Express imposes. Diagnose honestly first: if an application leaves transactions open, a bigger edition buys a longer queue rather than a fix, and you will be back here in a month. Where the ceiling genuinely is the problem, Arco supplies SQL Server 2025 Standard in 2-core packs, sized against the cores the instance would run on, and can tell you whether Server plus CAL suits your user count better.

Every code this article covers

Code What it points at Source
17300 A new system task could not be run, either through insufficient memory or because the number of configured sessions exceeds the maximum allowed; the message names user connections and sys.dm_exec_sessions as the things to check Microsoft Learn
1204 The engine cannot obtain a LOCK resource; the message asks you to check the lock and memory configuration and to look for long-running transactions Microsoft Learn
17888 All schedulers on a node appear deadlocked due to a large number of worker threads waiting on the resource the message names Microsoft Learn
17887 The I/O completion listener on a node appears to be non-yielding, with the CPU used and the interval in the message Microsoft Learn

Confirm the fix worked

  1. sys.dm_os_schedulers under peak load shows runnable_tasks_count and work_queue_count near zero.
  2. Nothing is waiting on THREADPOOL in sys.dm_os_waiting_tasks.
  3. No single session holds an order of magnitude more locks than the rest in sys.dm_tran_locks.
  4. The error log shows no new 17300, 1204, 17887 or 17888 across a business day.
  5. Re-run the statement that raised 1204 while watching the OBJECTSTORE_LOCK_MANAGER clerk, and confirm it stays bounded.

Questions people ask about this

Should I just raise max worker threads?

Almost never. The computed default is sized to the processors the instance may use, and raising it adds context switching without adding capacity. Worker exhaustion is usually a blocking or parallelism problem in disguise.

Does adding cores to the virtual machine help on Express?

No. Express is limited to the lesser of 1 socket or 4 cores however many you present. The extra cores are visible to Windows and ignored by the engine, which is a common way to waste money here.

Can I increase lock memory directly?

The locks option exists, but Microsoft describes dynamic allocation as the recommended configuration and the dynamic pool is bounded at 60 per cent of the engine’s memory regardless. Reduce the number of locks the workload takes instead, through batching, escalation and indexing.

Why will the dedicated administrator connection not connect?

Two likely reasons. Only one DAC is allowed per instance, so a second attempt is refused with error 17810. And it is local-only by default: network use requires the remote admin connections option, which has to be enabled before you need it.

How do I tell an edition limit from a bad application?

Compare what the instance uses with what the machine has. A scheduler count matching the licensed core cap on a much larger server, with memory pinned at the ceiling, points at the edition. Spare capacity plus one session holding a transaction for an hour points at the application.

Related error codes

Was this article helpful?

Your feedback helps us improve our documentation.

Related articles

Free Fix SSIS Error 0xC020801C: Cannot Acquire Connection From Connection Manager License Error Error 976: The Target Database Is Not Available on a Readable Secondary Free Fix Error 1101 and 665: Out of Disk Space and NTFS File System Limits License Error Error 40544: The Azure SQL Database Has Reached Its Size Quota
โ† Back to Knowledge Base