locked
SQL pages out with event 17890, which stops WSUS from working RRS feed

  • Question

  • Hi, I have a regular issue with my WSUS box. It's Windows Server 2016 with 4GB of RAM, and WSUS regularly stops working on it.

    In the Event Log, I get a SQL Server event form the WID with Event ID 17890:

    "A significant part of sql server process memory has been paged out. This may result in a performance degradation. Duration: 0 seconds. Working set (KB): 301216, committed (KB): 698220, memory utilization: 43%%."

    The next entry in the event log is typically under 10 minutes later, and it's 7 events from WSUS saying the various bits aren't working (13042,12002,12012,12032,12022,12042,12052,12072). These will continue until I reboot.

    I've tried restarting the WSUS services once a week using the following Powershell, but this doesn't fix the issue:

    Stop-Service WSUSService,W3SVC,'MSSQL$MICROSOFT*'
    Start-Service 'MSSQL$MICROSOFT*',W3SVC,WSUSService

    This executes ok but doesn't fix the issue. I thought restarting SQL Server would make it all start working again, but it doesn't. If I do a reboot, this does fix it every time. But, I'd rather configure my server better than force a reboot once a week.

    I do already run cleanup scripts on the database, using the famous "run once a month database cleanup" script that MS wrote and put up on technet, that does the reindexing etc. I also run Invoke-WsusServerCleanup each night, do Declines once a month, and all the things you're supposed to do to keep your WSUS database clean and tidy and optimal, and as part of the install I set the IIS memory limit:

    [int64]$PrivMemMax = 2.5GB / 1024 # Value in KB
    Set-ItemProperty IIS:\AppPools\WsusPool -Name Recycling.periodicrestart.privateMemory -Value $PrivMemMax

    But none of this seems to help with SQL Server needing to page out every so often, and at random times.

    Can you suggest what I can do? If I can run some Powershell to set some limits or configure the SQL WID process better when I build the machine, this would be ideal.

    Thanks.

    Wednesday, November 14, 2018 9:39 AM

Answers

  • I've solved this now.

    The SQL paging issue was causing the WsusPool IIS apppool to stop. I ran the following PowerShell to disable the rapidfail:

    Set-ItemProperty IIS:\AppPools\WsusPool -Name failure.rapidFailProtection -Value $false
    Set-ItemProperty IIS:\AppPools\WsusPool -Name startMode -Value AlwaysRunning

    The SQL paging events still occur, but now they don't stop the app pool, so WSUS remains available.

    • Marked as answer by R___B Monday, December 3, 2018 8:46 AM
    Monday, December 3, 2018 8:46 AM

All replies

  • Hi,

    I've seen this happening when the WSUS app pool was suffering of low memory conditions. 
    We can try to improve the WSUS pool: 


    Hope my answer could help you and look forward to you feedback.

    Best regards,
    Johnson
    =====================
    Please remember to mark the replies as answers if they help. If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com.
    Thursday, November 15, 2018 5:36 AM
  • Hi Johnson, I already set the PrivMemMax to 2.5GB for the WsusPool; I provided the code I use in my question. When I've been working on the WSUS machine I've never seen the IIS Worker process go above 2GB in use, even when I'm running mass Approvals or database cleanups or other processes that you would expect to induce a spike in activity, so I set it at 2.5GB to give some leeway. Additionally, the SQL paging happens at random times, it's not due to any WSUS activity. If I look at the events in the log that I copied the event ids from, this all happened at 10:27AM, when nothing was happening - no automated processes, no cleanups, nothing. I've read on other websites that SQL will page stuff out during idle times.

    I think the solution will be more of the form "how do I configure SQL/WID better" than "how do I configure WSUS better", because the WID isn't WSUS-specific, it's available for use by other processes and is run by its own independent service. It's just that, when it does do its paging operation - which is a perfectly valid thing for it to do - WSUS falls over in a heap and doesn't recover until you reboot.

    Friday, November 16, 2018 8:59 AM
  • I've solved this now.

    The SQL paging issue was causing the WsusPool IIS apppool to stop. I ran the following PowerShell to disable the rapidfail:

    Set-ItemProperty IIS:\AppPools\WsusPool -Name failure.rapidFailProtection -Value $false
    Set-ItemProperty IIS:\AppPools\WsusPool -Name startMode -Value AlwaysRunning

    The SQL paging events still occur, but now they don't stop the app pool, so WSUS remains available.

    • Marked as answer by R___B Monday, December 3, 2018 8:46 AM
    Monday, December 3, 2018 8:46 AM
  • These are the corrected powershell commands:

    Import-Module WebAdministration
    Set-ItemProperty -Path IIS:\AppPools\WsusPool -Name failure.rapidFailProtection -Value $false
    Set-ItemProperty -Path IIS:\AppPools\WsusPool -Name startMode -Value AlwaysRunning

    Wednesday, April 24, 2019 3:00 PM