May 142019
 

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.

WSUS Connection Error presented when memory issue occurs
WSUS 503 Error: Connection Error

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

  1. 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).
    Internet Information (IIS) Services in Start Menu
  2. On the left hand side under “Connections”, expand the server, and select “Application Pools”.
    IIS Application Pools Selected
  3. On the right hand side under “Application Pools” heading, right-click on “WsusPool” and select “Advanced Settings”.
    WsusPool Application Pool Selected with Right-Click
  4. 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.
    Private Memory Limit set to "0" in WsusPool IIS Application Pool
  5. Select “Ok” to close the window.
  6. 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.

  23 Responses to “WSUS IIS Memory Issue – Error: Connection Error”

  1. […] 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. […]

  2. 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!

  3. 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.

  4. Awesome! Thanks Griff! 🙂

  5. 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.

  6. Thanks, nice painkiller for the headache i was greeted by my server this morning.

  7. Great! you save me!

  8. 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!!!

  9. Awesome its works

  10. This fixed a lot of issues with WSUS. And thanks to the Griff for the PS code!

  11. you can also just use PowerShell instead of GUI.

    Set-ItemProperty IIS:\AppPools\WSUSPool -Name recycling.periodicrestart.privateMemory -Value 0

  12. Perfect thanks for this. Had me scratching my head 🙂

  13. Thanks, but this is not working at my WSUS Server.

  14. Worked for me! Thank you so much.

  15. Worked like a charm! Thank you so much!

  16. 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”

  17. […] WSUS IIS Memory Issue – Error: Connection Error […]

  18. Fixed my issue, I had roughly 1800000KB set.
    Changed that to 0 reset IIS in cmd, launched WSUS all set.

  19. Fixed my issue. A good article.

  20. Been struggling with this issues for far too long, thank you 🙂

 Leave a Reply

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>

(required)

(required)