IIS and SQL Server CPU Spike

A sudden power loss is a "brute force" shutdown. It often causes high CPU and memory spikes upon reboot because the system is struggling to recover from an unclean state.



Why this happened (and how to prevent it)

The image above illustrates how the Web Server and Database compete for the same system resources. Based on your screenshot, here is what likely triggered the spike:

  • The "Cold Start" Problem: When you start IIS, the AIMTEAM pool likely tries to load a massive amount of data into that 4.8 GB memory space.

  • Database Stress: SQL Server hits 95% CPU because it is frantically trying to serve all those initial data requests to IIS at once.


Refined Execution Plan

  1. Stop Services (The Correct Order):

    • First: Stop IIS Worker Process (or iisreset /stop in Command Prompt). This cuts off the traffic.

    • Second: Stop your PIS Services (the application layer).

    • Third: Stop SQL Server. Stopping SQL last ensures that any pending transactions from the web server have a chance to finish before the database shuts down.

  2. Clear Application Pool (AIMTEAM):

    • Go to IIS Manager > Application Pools.

    • Right-click AIMTEAM and select Recycle (or Stop, then Start).

    • Tip: While you are here, check the Advanced Settings of the pool. If "Private Memory Limit" is set to 0 (unlimited), consider setting a limit so it doesn't hit 4.8 GB and crash the OS again.

  3. Delete IIS Logs:

    • Navigate to C:\inetpub\logs\LogFiles\W3SVC1.

    • You can safely delete old .log files. This clears up disk space but won't directly lower CPU usage.

Ulasan

Catatan popular daripada blog ini

SISTEM PENGOPERASIAN KOMPUTER (OS)

APA ITU ASCII (AMERICAN STANDARD CODE FOR INFORMATION INTERCHANGE) ?

APA ITU STRUCTURED QUERY LANGUAGE (SQL)