our asp site is taking very high cpu usage
what are the reasons for such high usage.
we have used stored procedures n also indexed the tables


is it possible to detect cpu usage and display a custom message to users to hold for some time if usage is very high

Dani AI

Generated

Quick practical checklist and next steps (IIS6 / classic ASP)

Common root causes are the IIS worker process (w3wp.exe) doing expensive work, the database server consuming CPU for badly performing queries, or application-level loops/ per-request work that scale poorly. was right to suggest profiling; since hit problems with ASPProfiler and () noted it’s VBScript-only and shared hosting prevents DLL registration, here's a sequence that works with or without full server access.

  1. Confirm which process is hot. On a server with access use Process Explorer to identify the process and view thread stacks (Process Explorer). To capture a dump during a spike for later analysis use ProcDump (ProcDump) and hand the dump to the host or analyze with DebugDiag.

  2. If the database looks involved, capture the top CPU consumers with SQL Server tools: SQL Server Profiler or the DMVs that surface expensive plans and missing-index suggestions (see SQL Server Profiler and sys.dm_exec_query_stats).

  3. When server tools are not available (shared hosting), instrument the application instead. Add lightweight timing and counters: record request start/end and duration to a small table or an Application counter, sample only slow requests to avoid extra load, and log page, URL and time. A very simple classic‑ASP pattern is to increment an Application counter at begin-request and decrement at end-request, and show a friendly “server busy” message when the counter exceeds a safe threshold. (Caution: Application.Lock serializes access and can itself become a bottleneck — prefer sampling or a small DB table if possible.)

If immediate relief is needed, contact the host and ask for process dumps, top CPU process info, or temporary throttling. The above steps provide a factual way to find whether the problem is app code, SQL, or server-level, and allow targeted fixes rather than guesswork.

Recommended Answers

All 6 Replies

You can look for an ASP profiler and examine your code with that. My guess is there could be a bug causing a loop to run longer than necessary, but that's just a wild random guess.

What version of IIS are you using?

You can look for an ASP profiler and examine your code with that. My guess is there could be a bug causing a loop to run longer than necessary, but that's just a wild random guess.

I tried to use profiler from http://aspprofiler.sourceforge.net/
but its not working at 2nd step (giving js error)

i also found one at http://www.alphasierrapapa.com/iisdev/components/profiler/
but due to shared hosting we are unable to register dll

can you suggest any source for profiler

What version of IIS are you using?

Its IIS 6

ASP Profiler at http://aspprofiler.sourceforge.net/ says VBScript only, if you tried to use it on JavaScript ASP. Or you may have have a missing "On Error Resume Next" setting. Try the 2.2 version.

I dont have any problem on IIS7 i will try my site on iis6 in a few days.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.