Share via

IIS “Web Service” and “Web Service Cache” performance counter sets disappear on Windows Server 2022 until IIS is reinstalled

Libin L 0 Reputation points
2025-12-26T14:02:14.8766667+00:00

Environment:

  • Windows Server 2022
  • IIS 10.0

Issue Summary:

I regularly collect IIS performance metrics using Windows Performance Counters.

Initially, the IIS-related counter sets were all available:

  • Web Service
  • Web Service Cache
  • APP_POOL_WAS
  • WAS_W3WP
  • W3SVC_W3WP

After a few days, without any configuration changes, the following two IIS counter sets disappeared completely from Get-Counter / Performance Monitor:

  • Web Service
  • Web Service Cache

The other IIS counter sets (APP_POOL_WAS, WAS_W3WP, W3SVC_W3WP) still remained visible.

Commands used:

get-counter -listset * | select countersetname

Observed Behavior:

  • “Web Service” and “Web Service Cache” do NOT appear in the counter set list.
  • No errors in the Event Viewer related to performance counters.
  • IIS is running normally and serving requests.

Workaround:

If I remove the IIS role and re-install/enable it again, both counter sets appear again and work normally.

Expected Behavior:

IIS performance counter sets should remain registered and available as long as the IIS Web Server role is enabled.

Questions:

  1. Why do these two specific IIS counter sets disappear automatically over time?
  2. Is this a known issue in Windows Server 2022 IIS performance counters?
  3. Are there recommended steps to prevent these counters from getting unregistered?
  4. Which logs or components handle the registration/unregistration of IIS counter sets?

Any guidance or official fix would be helpful.

Windows development | Internet Information Services

2 answers

Sort by: Most helpful
  1. Tom Tran (WICLOUD CORPORATION) 4,680 Reputation points Microsoft External Staff Moderator
    2025-12-29T09:49:36.2333333+00:00

    Hi @Libin L ,

    Thanks for sharing your details!

    After looking around, this is what I managed to find:


    1. Why do only “Web Service” and “Web Service Cache” disappear while APP_POOL remains visible?

    I couldn't find no official Microsoft documentation or KB that explains these two IIS counter sets being automatically removed or unregistered on Windows Server 2022 while IIS remains healthy. However, when this happens and IIS keeps serving traffic, it usually indicates a performance counter registration issue, not a problem with IIS itself.

    These counter sets are exposed through the Windows Performance Library (Perflib) and are registered during IIS role installation. If the registration data becomes inconsistent, PerfMon and Get-Counter will stop listing them even though the underlying IIS functionality is unaffected.


    2. Is this a known issue in Windows Server 2022 / IIS where counters disappear automatically?

    At this time, no. This behavior does not appear in the official Windows Server 2022 known issues list, and there is no Microsoft article calling it a product bug or expected behavior


    3. Are there recommended steps to prevent these counters from getting unregistered?

    As for as I know, Microsoft does not provide any IIS-specific setting to “lock” these counters in place. The supported guidance focuses on repairing and validating performance counters when they go missing.

    The commonly recommended and supported steps are:

    Disclaimer: This is a non-Microsoft website. The page appears to be providing accurate, safe information. Watch out for ads on the site that may advertise products frequently classifies as a PUP (Potentially Unwanted Products). Thoroughly research any product advertised on the site before you decide to download and install it.

    These steps fix the registration state but do not guarantee the counters will never disappear again, since Microsoft does not document what specifically triggers the unregistration in the first place.


    4. Which logs or components handle the registration/unregistration of IIS counter sets?

    IIS performance counters are registered through the Windows Performance Library (Perflib) using provider DLLs installed with the IIS role. The registration data lives primarily under:

    • HKLM\SYSTEM\CurrentControlSet\Services\<ServiceName>\Performance

    When failures occur during counter loading or provider initialization, they are typically logged under:

    • Event Viewer → Applications and Services Logs → Microsoft → Windows → Perflib

    In short, you’re not missing an official explanation, there genuinely isn’t one published today. Reinstalling the IIS role works because I think it re-registers the counters cleanly, confirming this is a counter-registration issue rather than an IIS runtime problem.

    1 person found this answer helpful.

  2. Q&A Assist
    2025-12-26T14:03:24.93+00:00
    AI generated content. This question contains an answer created with AI from Q&A Assist. Learn more

    The disappearance of the "Web Service" and "Web Service Cache" performance counter sets in IIS on Windows Server 2022 could be related to several factors, including potential corruption of the performance counter library or issues with the registration of these counters. Here are some insights regarding your questions:

    1. Why do these two specific IIS counter sets disappear automatically over time?
      The performance counter library may become corrupted or improperly registered, which can lead to specific counter sets disappearing. This can happen due to various reasons, including system updates, application changes, or issues with the underlying Windows Management Instrumentation (WMI).
    2. Is this a known issue in Windows Server 2022 IIS performance counters?
      While there is no specific mention of this issue in the provided context, performance counter issues are not uncommon in server environments, especially after updates or changes to the system. It may be beneficial to check for any updates or patches that address performance counter issues specifically for IIS on Windows Server 2022.
    3. Are there recommended steps to prevent these counters from getting unregistered?
      To prevent performance counters from becoming unregistered, ensure that your system is regularly updated, and consider rebuilding the performance counter library if issues persist. You can use commands like lodctr /R to rebuild the performance counters if they become corrupted.
    4. Which logs or components handle the registration/unregistration of IIS counter sets?
      The registration and unregistration of performance counters are primarily handled through the Windows Registry and the performance counter library files located in %Systemroot%\System32. Monitoring the Event Viewer for any related events may also provide insights into any issues that occur during the registration process.

    If you continue to experience issues, consider reaching out to Microsoft support for more detailed assistance regarding this specific behavior in IIS on Windows Server 2022.


    References:

    0 comments No comments

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.