ANAVEM
Languagefr
Windows server monitoring dashboard showing network connection status and event logs in a professional data center environment
Event ID 2019WarningSrvWindows

Windows Event ID 2019 – Srv: Server Service Connection Limit Exceeded

Event ID 2019 indicates the Windows Server service has reached its maximum connection limit, preventing new client connections until existing sessions are freed.

Emanuel DE ALMEIDAEmanuel DE ALMEIDA
18 March 202612 min read 0
Event ID 2019Srv 5 methods 12 min
Event Reference

What This Event Means

Windows Event ID 2019 represents a resource limitation warning generated by the Server service (Srv) when the system cannot accept additional client connections due to reaching configured connection limits. The Server service manages network connections for file sharing, print services, named pipes, and other network-based resources on Windows systems.

When this event occurs, the system has exhausted its available connection slots in the server connection table. Each client connection to shared resources consumes one connection slot, and Windows maintains these connections until clients properly disconnect or sessions timeout. The connection limit varies based on Windows edition, licensing configuration, and registry settings.

The event typically includes information about the current connection count, maximum allowed connections, and the specific service or resource that triggered the limit. This data helps administrators understand usage patterns and identify whether the issue stems from legitimate high usage, connection leaks, or misconfigured limits.

In 2026 environments, this event has become more relevant with increased remote work scenarios, cloud-hybrid configurations, and containerized workloads that may create unexpected connection patterns. Modern Windows versions include enhanced connection tracking and automatic cleanup mechanisms, but legacy applications or misconfigured services can still trigger connection exhaustion scenarios.

Applies to

Windows 10Windows 11Windows Server 2019/2022/2025
Analysis

Possible Causes

  • Maximum server connections limit reached due to high client demand
  • Client applications not properly releasing connections after use
  • Insufficient Windows Server licensing limiting concurrent connections
  • Registry settings configured with overly restrictive connection limits
  • Network services or applications creating excessive persistent connections
  • Malware or unauthorized access attempts consuming connection resources
  • Legacy applications with poor connection management practices
  • Domain controller overload during peak authentication periods
  • File server saturation from backup operations or bulk file transfers
Resolution Methods

Troubleshooting Steps

01

Check Current Server Connections

Start by examining current server connections to understand usage patterns and identify potential connection leaks.

1. Open Event Viewer and navigate to Windows LogsSystem to view the Event ID 2019 details.

2. Use PowerShell to check current server sessions:

Get-SmbSession | Select-Object ClientComputerName, ClientUserName, SessionId, NumOpens
Get-SmbOpenFile | Group-Object ClientComputerName | Sort-Object Count -Descending

3. Review active connections using the built-in net command:

net session
net use

4. Check for connection patterns in the event details, noting timestamps and frequency of occurrence.

5. Monitor connection usage over time using Performance Monitor with the Server\Sessions Errored Out and Server\Sessions Timed Out counters.

Pro tip: Look for clients with unusually high NumOpens values, as these may indicate applications not properly closing file handles.
02

Review and Adjust Connection Limits

Examine current connection limits and adjust them based on system capacity and licensing.

1. Check current connection limits in the registry:

Get-ItemProperty -Path "HKLM\SYSTEM\CurrentControlSet\Services\lanmanserver\parameters" -Name "MaxWorkItems"
Get-ItemProperty -Path "HKLM\SYSTEM\CurrentControlSet\Services\lanmanserver\parameters" -Name "MaxMpxCt"

2. For Windows Server editions, verify licensing allows for increased connections:

Get-WindowsFeature | Where-Object {$_.Name -like "*licensing*"}
Get-WmiObject -Class Win32_ServerFeature

3. Increase MaxWorkItems if system resources allow (default is typically 1024):

Set-ItemProperty -Path "HKLM\SYSTEM\CurrentControlSet\Services\lanmanserver\parameters" -Name "MaxWorkItems" -Value 2048 -Type DWord

4. Adjust MaxMpxCt for multiplexed connections (default 125):

Set-ItemProperty -Path "HKLM\SYSTEM\CurrentControlSet\Services\lanmanserver\parameters" -Name "MaxMpxCt" -Value 250 -Type DWord

5. Restart the Server service to apply changes:

Restart-Service -Name "lanmanserver" -Force
Warning: Increasing connection limits requires adequate system memory and may impact performance. Test changes in non-production environments first.
03

Implement Connection Monitoring and Cleanup

Deploy automated monitoring and cleanup procedures to prevent connection exhaustion.

1. Create a PowerShell script to monitor and log connection usage:

$LogPath = "C:\Logs\ConnectionMonitor.log"
$Connections = Get-SmbSession
$Count = $Connections.Count
$Timestamp = Get-Date -Format "yyyy-MM-dd HH:mm:ss"
Add-Content -Path $LogPath -Value "$Timestamp - Active Connections: $Count"

2. Set up a scheduled task to run connection monitoring every 15 minutes:

$Action = New-ScheduledTaskAction -Execute "PowerShell.exe" -Argument "-File C:\Scripts\ConnectionMonitor.ps1"
$Trigger = New-ScheduledTaskTrigger -RepetitionInterval (New-TimeSpan -Minutes 15) -RepetitionDuration (New-TimeSpan -Days 365) -At (Get-Date)
Register-ScheduledTask -TaskName "ConnectionMonitor" -Action $Action -Trigger $Trigger

3. Implement automatic cleanup of stale connections:

Get-SmbSession | Where-Object {$_.SecondsIdle -gt 3600} | Close-SmbSession -Force

4. Configure session timeout values in the registry:

Set-ItemProperty -Path "HKLM\SYSTEM\CurrentControlSet\Services\lanmanserver\parameters" -Name "autodisconnect" -Value 30 -Type DWord

5. Enable detailed logging for the Server service to track connection patterns:

wevtutil sl Microsoft-Windows-SMBServer/Audit /e:true
wevtutil sl Microsoft-Windows-SMBServer/Connectivity /e:true
04

Optimize Server Performance and Resources

Address underlying performance issues that may contribute to connection exhaustion.

1. Analyze system resource usage during peak connection periods:

Get-Counter "\Memory\Available MBytes", "\Processor(_Total)\% Processor Time", "\Server\Pool Paged Bytes", "\Server\Pool Nonpaged Bytes"

2. Check for memory pressure affecting the Server service:

Get-WmiObject -Class Win32_PerfRawData_PerfOS_Memory | Select-Object PoolPagedBytes, PoolNonpagedBytes, AvailableBytes

3. Optimize server work item allocation based on system memory:

$TotalRAM = (Get-WmiObject -Class Win32_ComputerSystem).TotalPhysicalMemory / 1GB
$OptimalWorkItems = [Math]::Min(8192, [Math]::Max(1024, $TotalRAM * 256))
Set-ItemProperty -Path "HKLM\SYSTEM\CurrentControlSet\Services\lanmanserver\parameters" -Name "MaxWorkItems" -Value $OptimalWorkItems -Type DWord

4. Configure additional server optimization parameters:

Set-ItemProperty -Path "HKLM\SYSTEM\CurrentControlSet\Services\lanmanserver\parameters" -Name "MaxThreadsPerQueue" -Value 20 -Type DWord
Set-ItemProperty -Path "HKLM\SYSTEM\CurrentControlSet\Services\lanmanserver\parameters" -Name "MaxFreeConnections" -Value 100 -Type DWord

5. Enable large system cache if the server is dedicated to file services:

Set-ItemProperty -Path "HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\Memory Management" -Name "LargeSystemCache" -Value 1 -Type DWord
Pro tip: Monitor the Server\Work Item Shortages counter in Performance Monitor to determine if MaxWorkItems adjustments are effective.
05

Advanced Troubleshooting and Network Analysis

Perform deep analysis of network patterns and potential security issues causing connection exhaustion.

1. Enable advanced SMB logging to capture detailed connection information:

Set-SmbServerConfiguration -AuditSmb1Access $true
Set-SmbServerConfiguration -EnableSMB1Protocol $false
wevtutil sl Microsoft-Windows-SMBServer/Security /e:true /ms:104857600

2. Use network packet capture to analyze connection patterns:

netsh trace start capture=yes provider=Microsoft-Windows-SMBServer level=4 keywords=0xFFFFFFFF tracefile=C:\Temp\smb_trace.etl maxsize=500

3. Analyze Event Tracing for Windows (ETW) logs for detailed server activity:

Get-WinEvent -FilterHashtable @{LogName='Microsoft-Windows-SMBServer/Connectivity'; StartTime=(Get-Date).AddHours(-1)} | Select-Object TimeCreated, Id, LevelDisplayName, Message

4. Check for potential security issues or unauthorized access attempts:

Get-WinEvent -FilterHashtable @{LogName='Security'; Id=4625,4648,4771} -MaxEvents 100 | Where-Object {$_.TimeCreated -gt (Get-Date).AddHours(-2)}

5. Implement connection rate limiting using Windows Firewall with Advanced Security:

New-NetFirewallRule -DisplayName "SMB Connection Rate Limit" -Direction Inbound -Protocol TCP -LocalPort 445 -Action Allow -DynamicTarget Any -EdgeTraversalPolicy Block

6. Create custom performance counters to track connection exhaustion events:

$CounterPath = "\\$env:COMPUTERNAME\Server\Sessions Errored Out"
$Counter = Get-Counter -Counter $CounterPath -SampleInterval 5 -MaxSamples 12
$Counter.CounterSamples | Export-Csv -Path "C:\Logs\ServerConnections.csv" -NoTypeInformation
Warning: Network tracing can generate large files and impact performance. Use only during troubleshooting periods and stop tracing promptly.

Overview

Event ID 2019 from the Srv (Server) service fires when Windows reaches its configured maximum number of concurrent server connections. This event typically appears in environments where multiple clients access shared resources like file shares, printers, or network services on a Windows machine. The Server service maintains a connection pool to manage client sessions, and when this pool becomes exhausted, new connection attempts are rejected until existing connections are released.

This event commonly occurs on Windows workstations configured as file servers, domain controllers handling numerous client requests, or systems with insufficient connection licensing. The event indicates resource exhaustion rather than a critical failure, but it directly impacts user productivity by preventing access to shared resources. Understanding this event is crucial for capacity planning and ensuring adequate server resources in multi-user environments.

The event appears in the System log and includes details about the current connection count and configured limits. Administrators should investigate connection patterns, review licensing configurations, and consider hardware upgrades or connection limit adjustments to resolve persistent occurrences.

Frequently Asked Questions

What does Event ID 2019 mean and why does it occur?+
Event ID 2019 indicates that the Windows Server service has reached its maximum connection limit and cannot accept new client connections. This occurs when too many clients are simultaneously accessing shared resources like file shares or printers, or when applications fail to properly release connections after use. The event serves as a warning that system resources are exhausted and new connection attempts will be rejected until existing sessions are freed.
How can I determine what is causing the connection limit to be reached?+
Use PowerShell commands like Get-SmbSession and Get-SmbOpenFile to identify active connections and which clients are consuming the most resources. Check the Event Viewer for patterns in timing and frequency of Event ID 2019 occurrences. Monitor Performance Counters for Server\Sessions Errored Out and Server\Sessions Timed Out to understand connection usage patterns. Look for clients with unusually high numbers of open files or sessions that may indicate connection leaks.
Is it safe to increase the MaxWorkItems registry value to resolve this issue?+
Increasing MaxWorkItems can resolve connection limit issues, but it requires adequate system memory and should be done carefully. Each work item consumes approximately 2KB of non-paged pool memory, so increasing from 1024 to 2048 requires about 2MB additional memory. Monitor system performance after changes and ensure sufficient RAM is available. Test changes in non-production environments first, and consider the underlying cause rather than just increasing limits indefinitely.
How do I prevent Event ID 2019 from recurring in the future?+
Implement proactive connection monitoring using scheduled PowerShell scripts to track usage patterns and automatically clean up stale connections. Configure appropriate session timeout values in the registry using the autodisconnect parameter. Ensure applications properly close connections and file handles when finished. Consider upgrading hardware or Windows Server licensing if legitimate usage consistently exceeds current limits. Deploy connection rate limiting and monitoring tools to detect unusual usage patterns.
What is the difference between connection limits on different Windows editions?+
Windows 10 and 11 Home editions are limited to 20 concurrent connections, while Pro and Enterprise editions support more connections based on available system resources. Windows Server editions have much higher limits and can be configured through registry settings and licensing. Server 2019/2022/2025 editions support thousands of concurrent connections when properly configured with adequate hardware and licensing. The actual limits depend on available memory, processor capacity, and specific Windows licensing terms.
Documentation

References (2)

Emanuel DE ALMEIDA
Written by

Emanuel DE ALMEIDA

Senior IT Journalist & Cloud Architect

Microsoft MCSA-certified Cloud Architect | Fortinet-focused. I modernize cloud, hybrid & on-prem infrastructure for reliability, security, performance and cost control - sharing field-tested ops & troubleshooting.

Discussion

Share your thoughts and insights

You must be logged in to comment.

Loading comments...