Hi @vijay reddi ,
Thank you for sharing your problem.
When you see a 200 response but time-taken is >500 ms, the delay is probably in the application code or a downstream dependency. Here’s a how you can troubleshoot:
- Review IIS logs
- Check the
time-taken field in the W3C logs. Identify which URLs are consistently slow and whether it happens on all web servers or just some of them.
- Enable Failed Request Tracing (FREB)
- Configure a rule for status code
200 with time-taken > 500 ms.
- FREB reports show exactly where the time is spent (IIS pipeline vs handler execution).
- Check server performance counters Collect a short PerfMon trace on both web and app servers. Key counters:
-
ASP.NET\Requests Queued, Requests Current, Request Execution Time
- ThreadPool available worker/I/O threads (check for starvation)
- CPU, memory, disk, and network utilization
- Test between tiers
- Run a simple
Invoke-WebRequest or curl directly from a web server to the app server endpoint. This confirms whether latency is introduced on the web tier, app tier, or downstream.
- Inspect application code patterns Common causes for delays in ASMX/.NET apps:
- Blocking calls (
.Result, .Wait()) leading to thread starvation
- Creating a new
HttpClient per request (socket exhaustion)
- Slow DB queries or synchronous I/O
- Low
ServicePointManager.DefaultConnectionLimit causing queued outbound calls
Fixes usually come down to:
- Convert to proper async I/O, reuse
HttpClient (or use HttpClientFactory), and optimize database queries.
- Apply caching for repeated calls.
- Tune app pool settings (queue length, recycling) and connection limits if needed.
This workflow (logs → FREB → PerfMon → direct tests → code inspection) usually isolates whether the extra latency comes from IIS pipeline, application logic, or backend dependencies.
Hope this helps. Please reach out if you encounter any problem.