Skip to content

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

Your vault is empty.

License Error 17809

Error 17809: The Maximum Number of User Connections Has Been Reached

12 min read Updated October 5, 2026 SQL Server

Fix it now

17809’s published text says the maximum number of user connections has been reached and that an administrator can use sp_configure to increase it. That wording settles the argument: this is a configuration ceiling, not a licence check. Either somebody set the ceiling low, or something is leaking connections.

Run in order. user connections is an advanced option, so the third line is required

SELECT @@MAX_CONNECTIONS AS Ceiling;
EXEC sp_configure 'show advanced options', 1;
RECONFIGURE;
EXEC sp_configure 'user connections';
SELECT COUNT(*) AS Sessions, program_name, host_name, login_name
FROM sys.dm_exec_sessions WHERE is_user_process = 1
GROUP BY program_name, host_name, login_name ORDER BY Sessions DESC;
  1. Read @@MAX_CONNECTIONS. The documented default for the option is 0, which means the maximum of 32,767 is allowed, so a small number here is something a person set.
  2. Read the session grouping. Hundreds of sessions from one program name and host is a pooling problem, not a capacity problem, and raising the ceiling only postpones it.
  3. If the ceiling is genuinely too low, set it back: EXEC sp_configure 'user connections', 0; RECONFIGURE; then restart the instance, because the option only takes effect on restart.
  4. Separately, count the users and devices that now reach this instance and check that against what you are licensed for. Nothing in the engine does that for you.

17810 is a different error and looks tempting when you are scanning a log. Its published text is about dedicated administrator connections, not user connections, so it is not evidence of anything here.

If new connections succeed and the session count is stable, you are done. If it climbs again by tomorrow, the next section explains where it is going.

Why it happens

The user connections option puts an upper bound on concurrent user connections. Microsoft documents its default as 0, which means the maximum of 32,767 user connections is allowed, and the engine is limited by memory and worker threads long before that. So a non-zero value is always something a person set, often years ago as a crude guard against a runaway application. When the ceiling is reached, new connections are refused while existing ones carry on, which is why new users cannot log in while everyone already working is fine.

Two documented details save a lot of time here. First, user connections is an advanced option, so sp_configure will not even acknowledge the name until show advanced options is 1 – otherwise you get error 15123 and conclude the option does not exist. Second, the change requires a service restart. The informational message 15457 confirms the new value is recorded and tells you to run RECONFIGURE, and comparing value with value_in_use in sys.configurations tells you whether the restart has actually happened.

The more common cause is not the ceiling but a pooling leak. Client libraries keep a pool per unique connection string, and code that opens connections without disposing of them exhausts that pool and keeps opening more. Two signs give it away: the session count climbs steadily through the day rather than tracking user activity, and most sessions are sleeping with no request in flight.

One error is worth taking off the table before you start. 17810 sits next to 17809 numerically and reads similarly at a glance, but its published text is that the maximum number of dedicated administrator connections already exists, and that the existing one must be dropped first. Microsoft’s own page on the diagnostic connection confirms it: only one DAC is allowed per instance, and a second request is denied with 17810. It says nothing about user connection capacity, and reading it as though it did sends you looking for a ceiling that is not there.

A configured ceiling is set too low

You have this one if @@MAX_CONNECTIONS returns a modest number and refusals begin at exactly that count.

  1. Set it back to the default: EXEC sp_configure 'show advanced options', 1; RECONFIGURE; EXEC sp_configure 'user connections', 0; RECONFIGURE;
  2. Restart the instance in a maintenance window. The option does not take effect until then.
  3. Confirm afterwards with SELECT @@MAX_CONNECTIONS; rather than assuming.

Leave it at 0 unless you have a specific reason not to. The engine limits itself by memory and available workers, which is a better boundary than a number somebody guessed at once.

An application is leaking connections

You have this one if The session count climbs steadily through the day and most sessions are sleeping, all from the same program name and host.

  1. Identify the application from the grouped session query, then restart it and confirm the count falls. That proves where the leak is.
  2. Have connections closed and disposed on every code path, including error paths, rather than left to garbage collection.
  3. Check whether the application uses several connection strings that differ only trivially, because each variant gets its own pool.

A connection string that varies per user, or that an application edits at runtime, multiplies the number of pools and therefore the number of connections, without anybody intending it.

Connections are held by long-running or abandoned work

You have this one if Sessions sit open with old last request times, sometimes with open transactions.

  1. List the oldest: SELECT session_id, login_name, status, last_request_end_time, open_transaction_count FROM sys.dm_exec_sessions WHERE is_user_process = 1 ORDER BY last_request_end_time;
  2. Find the owner of anything holding an open transaction before touching it. An abandoned session with an open transaction is also blocking other work.
  3. Set connection and command timeouts in the application so abandoned work closes itself.

The workload has genuinely grown

You have this one if The sessions are real and active, spread across many distinct users and hosts, and the count reflects actual use.

  1. Remove the artificial ceiling and confirm the instance has the capacity: SELECT max_workers_count FROM sys.dm_os_sys_info; plus the usual memory checks.
  2. Consolidate pools at the application tier where several services each hold one.
  3. Review licensing at the same time. A real growth in the user population is a commercial question as much as a capacity one.

You are reading 17810 and treating it as the same thing

You have this one if 17810 in the error log, and no corresponding evidence that user connections are exhausted.

  1. Read it as what it is: a second dedicated administrator connection was attempted while one already exists.
  2. Drop the existing DAC by logging off that session, or ending the process, before opening another.
  3. Remember only one DAC is allowed per instance, and that it is local-only unless remote admin connections has been enabled.

Full reference

The option, precisely as documented

Property Value
Default 0, meaning the maximum of 32,767 user connections is allowed
Maximum 32,767
Advanced option Yes. show advanced options must be 1 before sp_configure will accept the name
Restart required Yes
Reported by @@MAX_CONNECTIONS, and value versus value_in_use in sys.configurations
Then restart the instance in a maintenance window

USE master;
GO
EXECUTE sp_configure 'show advanced options', 1;
GO
RECONFIGURE;
GO
EXECUTE sp_configure 'user connections', 0;
GO
RECONFIGURE;
GO
EXECUTE sp_configure 'show advanced options', 0;
GO
RECONFIGURE;
GO

Telling capacity from leakage

What you see What it means
@@MAX_CONNECTIONS returns a small number Somebody set a ceiling. That is your limit
@@MAX_CONNECTIONS returns 32767 The option is at its default; the refusal came from somewhere else
Sessions climb steadily all day and never fall back A disposal or pooling leak in an application
Hundreds of sessions from one program name and host One application, not many users
15457 after changing the setting Recorded but not in use. Run RECONFIGURE, then restart
17810 A second dedicated administrator connection. Unrelated to user capacity

Queries worth keeping

Query What it gives you
SELECT @@MAX_CONNECTIONS; The ceiling currently in force
SELECT name, value, value_in_use FROM sys.configurations WHERE name = 'user connections'; Whether a change has taken effect yet
Sessions grouped by program, host and login Which application or which people hold them
SELECT max_workers_count FROM sys.dm_os_sys_info; How many workers the instance has for the connections it accepts
SELECT session_id, status, last_request_end_time, open_transaction_count FROM sys.dm_exec_sessions WHERE is_user_process = 1; Which sessions are idle, and which are idle with a transaction open

Why raising the number is rarely the answer

The engine already bounds itself by memory and by the worker pool, both of which reflect what the machine can actually do. A fixed number set by hand reflects what somebody once guessed, and raising it converts a clean refusal into a slower, less obvious failure once workers or memory run short instead. If the sessions are real, capacity is the question. If they are sleeping and multiplying, the number is not the problem and changing it buys a few days at most.

The one thing not to do

Do not use KILL to clear a connection count. Rolling back an open transaction can take longer than the work it undoes, you will not know what you interrupted, and the session that was leaking will simply open another. Find the application, restart it, and fix the disposal.

What the engine does and does not enforce

  • It enforces the user connections ceiling, and reports 17809 when it is reached.
  • It enforces nothing about client access licences. There is no counter, no warning and no refusal on that basis anywhere in the product.
  • That is why entitlement and reality drift apart quietly over years, and why an error like this is often the first time anyone counts.
  • The count that matters commercially is of the people and devices that use the system, which is not the same as the number of connections a middle tier holds open.

When a licence is the actual fix

Be clear about this first: 17809 is not a licensing error and SQL Server never raises one. The engine will accept far more connections than you hold licences for, which is exactly why entitlement drifts out of step with reality unnoticed. If this error was the first sign that the user population has grown, the count is worth doing properly, but do it against your own agreement rather than against anything the engine reports, because it reports nothing. Under Server plus CAL the number that matters is the users or devices that access the server, and how indirect access through a middle tier or a web front end is counted is a question for your licensing terms rather than for the database. Arco supplies SQL Server User CALs and can work through whether Server plus CAL or core licensing is now the cheaper shape for the number of people you actually have.

Every code this article covers

Code What it points at Source
17809 A connection was refused because the maximum number of user connections has already been reached; the message itself points at sp_configure to raise it Microsoft Learn
15457 Informational: a configuration option was changed and RECONFIGURE must be run to install it Microsoft Learn
17810 A connection was refused because a dedicated administrator connection already exists; the existing one must be dropped first. It is not about user connection capacity Microsoft Learn

Confirm the fix worked

  1. SELECT @@MAX_CONNECTIONS; returns the value you intended, after the restart.
  2. value and value_in_use for user connections in sys.configurations now match.
  3. The session count sits at a stable level that tracks activity rather than climbing all day.
  4. The application that was refused connects, and its own logs show no further connection failures.
  5. You have a current count of the users or devices reaching this instance, and licensing that matches it.

Questions people ask about this

Does SQL Server enforce client access licences?

No. There is no technical enforcement of CAL counts anywhere in the product, and 17809’s own text points at sp_configure rather than at any entitlement. Compliance is something you manage yourself, which is precisely why it drifts quietly over the years.

What should I set user connections to?

Leave it at 0 unless you have a concrete reason. The documented default of 0 means the maximum of 32,767 is allowed, and the engine limits itself by memory and worker threads well before that. A fixed number set years ago reflects what somebody guessed.

Why did sp_configure tell me the option does not exist?

Because user connections is an advanced option. Set show advanced options to 1 and run RECONFIGURE first, otherwise you get error 15123, which reads like a typo in the option name.

I changed the value and nothing happened. Why?

The option requires a service restart. Message 15457 tells you the value is recorded and RECONFIGURE is needed; comparing value with value_in_use in sys.configurations tells you whether the restart has happened.

Is 17810 the same problem?

No. 17810 is about dedicated administrator connections: only one is allowed per instance and a second request is denied with that error. It is not evidence that user connections are exhausted.

Related error codes

Was this article helpful?

Your feedback helps us improve our documentation.

Related articles

License Error Error 22022: SQLServerAgent Is Not Currently Running, or Does Not Exist Free Fix Error 605: Page Belongs to the Wrong Allocation Unit – Corruption or Dirty Read Free Fix Error 7391: The Linked Server Could Not Begin a Distributed Transaction Free Fix Error 14274: Jobs Break After a Server Rename or an MSX Move
โ† Back to Knowledge Base