On a fresh or existing WSUS install, you may notice that the WSUS Administrator MMC applet stops functioning and present the error “Error: Connection Error – An error occurred trying to connect to the WSUS Server.”
I originally experienced this on Windows Server Update Services running on Windows Server 2012 R2 and applied the fix. Recently, I deployed Windows Server Update Services on a new Windows Server 2019 – Server Core install, and experienced this issue during the first synchronization. Before realizing what the issue was, I attempted to re-install WSUS and IIS from scratch numerous times until I came across old notes. One would have thought they would have resolved this issue on a new server operating system.
When the issue occurs, all processes will appear to be running on the server. Looking at the server event log, you’ll notice multiple application errors:
Event ID: 13042 - Windows Server Update Services Description: Self-update is not working.
Event ID: 12002 - Windows Server Update Services Description: The Reporting Web Service is not working.
Event ID: 12012 - Windows Server Update Services Description: The API Remoting Web Service is not working.
Event ID: 12032 - Windows Server Update Services Description: The Server Synchronization Web Service is not working.
Event ID: 12022 - Windows Server Update Services Description: The Client Web Service is not working.
Event ID: 12042 - Windows Server Update Services Description: The SimpleAuth Web Service is not working.
Event ID: 12052 - Windows Server Update Services Description: The DSS Authentication Web Service is not working.
Event ID: 12072 - Windows Server Update Services Description: The WSUS content directory is not accessible. System.Net.WebException: The remote server returned an error: (503) Server Unavailable. at System.Net.HttpWebRequest.GetResponse() at Microsoft.UpdateServices.Internal.HealthMonitoring.HmtWebServices.CheckContentDirWebAccess(EventLoggingType type, HealthEventLogger logger)
You will also see the below error message when attempting to use the WSUS MMC.
The Problem
This issue occurs because the WSUS application pool in IIS “WsusPool” has reached it’s maximum private memory limit and attempts to recycle the memory usage.
Ultimately I believe this causes the IIS worker process to crash since it has run out of memory, and the pending command (whether it’s a synchronization or something else) fails to complete.
Previously, I noticed database corruption on a WSUS SQL Express database when this issue occurred, so I recommend applying the fix on a fresh install of WSUS.
The Fix
To resolve this issue, we need to adjust the max
- On the server running WSUS and IIS, open the “Internet Information Services (IIS) Manager” inside of the “Windows Administrative Tools” (found in the start menu, or Control Panel).
- On the left hand side under “Connections”, expand the server, and select “Application Pools”.
- On the right hand side under “Application Pools” heading, right-click on “WsusPool” and select “Advanced Settings”.
- In the “Advanced Settings” window, scroll down until you see “Private Memory Limit (KB)”. Either change this to “0” (as shown below) to set no memory limit, or increase the limit to the value you prefer.
- Select “Ok” to close the window.
- Restart IIS by running “iisreset” from an administrative command prompt, restarting the server, or selecting “Restart” under “Manage Server” when looking at the default pane in IIS when the server is selected.
The issue should now be resolved and your WSUS server should no longer be crashing.
If you are applying this fix on a Server Core install, you’ll need to connect remotely to the IIS instance to apply the fix.
[…] I originally had to figure this out so I could modify the “WsusPool” Application Pool on IIS on a Windows Server Core install that was hosting a WSUS Server to increase the Private Memory Maximum setting. […]
[…] Apply “Private Memory Limit (KB)” fix as provided here: https://www.stephenwagner.com/2019/05/14/wsus-iis-memory-issue-error-connection-error/ […]
[…] Apply the “Private Memory Limit (KB)” fix as provided here: https://www.stephenwagner.com/2019/05/14/wsus-iis-memory-issue-error-connection-error/ […]
Thanks! I found a lot of bad advice about this problem but you nailed it. And, like you, I am astonished that a problem, and misleading messages that give you no clue, that was in 2012 is still in 2019!
You can do this in powershell, on the WSUS box, without needing the IIS management console.
PS > import-module webadministration
PS > Set-ItemProperty IIS:\AppPools\WsusPool -Name recycling.periodicrestart.privateMemory -Value 0
PS > iisreset
This way if your WSUS box is on Server Core you don’t need to have a workstation/gui handy to make 1 config change.
Awesome! Thanks Griff! 🙂
Thank you for this fix, it looks like Microsoft, in their testing, underestimated the amount of memory the WSUS app pool required for sound operations post the initial configuration and syncing. I say that because doing all the post configuration tasks went smoothly and the initial syncing went smoothly. But after I added client desktop computers into the mix WSUS went over the cliff.
Thanks, nice painkiller for the headache i was greeted by my server this morning.
Great! you save me!
Was moving from a 2016 to 2019 Windows server and was having all type of issues with getting it to work correctly. This helped me understand where the issue was and how to fix it.
Thanks, Stephen!!!
Awesome its works
This fixed a lot of issues with WSUS. And thanks to the Griff for the PS code!
you can also just use PowerShell instead of GUI.
Set-ItemProperty IIS:\AppPools\WSUSPool -Name recycling.periodicrestart.privateMemory -Value 0
Thanks Max!
Perfect thanks for this. Had me scratching my head 🙂
Thanks, but this is not working at my WSUS Server.
Worked for me! Thank you so much.
Worked like a charm! Thank you so much!
This + The following steps resolved it for me:
– Launch IIS Manager
– Open “Application Pools”
– Right click “WsusPool”
– Select “Advanced Settings…”
– Change (General) Queue Length from 1,000 (Default) to 25,000
– Change (Rapid-Fail Protection) Service Unavailable from “HttpLevel” (Default) to Reponse to “TcpLevel”
– Change (Rapid-Fail Protection) Failure Internal (minutes) from (Default) “5” to “30”
– Change (Rapid-Fail Protection) Maximum Failures from (Default) “5” to “30”
Press “OK”
– CLI “iisreset”
[…] WSUS IIS Memory Issue – Error: Connection Error […]
Fixed my issue, I had roughly 1800000KB set.
Changed that to 0 reset IIS in cmd, launched WSUS all set.
Fixed my issue. A good article.
Been struggling with this issues for far too long, thank you 🙂