Hi ,

I am working on an application to fetch and display the image from the video server by using asynchronous HTTPHandler.

it is working fine but when 10 clients try to access the URL at the same time "Page cannot be accessed" error occurs.

Can anyone help me how to handle this case

Thanks,

Dani AI

Generated

is fetching frames via an async HTTP handler and sees "Page cannot be accessed" when about ten clients hit the URL at once. 's suggestion to check thread-pool and server capacity is a good starting point. Below is a short, practical plan that focuses on diagnosing whether the problem is code-level blocking, ASP.NET thread exhaustion, or an IIS/queue limit — and quick fixes to try safely.

Diagnostic checklist (quick and repeatable)

  • Reproduce locally with a simple load tool (example: ab -n 100 -c 10 http://yourhost/handler). Confirm the failure is concurrency-related.
  • Turn on IIS Failed Request Tracing and check Windows Event Log for exceptions or timeouts.
  • Watch Performance Monitor counters while testing: ASP.NET requests (executing/queued), Process\Thread Count, Processor Time, and .NET CLR thread/IO counters. Look for many requests queued or thread count hitting a ceiling.
  • Audit the handler code for blocking calls, locks, or synchronous network I/O that serialize work (for example, blocking reads, WaitHandle.WaitOne, Thread.Sleep, or a static lock around I/O).

Practical fixes

  • Prefer non-blocking I/O: use async/await with HttpClient or a true IHttpAsyncHandler so requests do not hold worker threads while awaiting the video server.
  • As a temporary mitigation, raise the thread-pool minimum to avoid long ramp-up delays (do not treat this as a cure for blocking code):
// Global.asax Application_Start
int worker, io;
System.Threading.ThreadPool.GetMinThreads(out worker, out io);
System.Threading.ThreadPool.SetMinThreads(Math.Max(20, worker), io);
  • Also review the application pool "Queue Length" and ensure you're not using a global lock or exclusive file access that serializes requests. If the handler opens a connection per request, pool or reuse connections.

Caution: increasing threads or queue length can hide the real problem and exhaust CPU/memory. First verify with tracing and perf counters that the handler is doing blocking work; fix that code (async I/O, remove global locks, reuse connections) for a robust solution.

Recommended Answers

All 3 Replies

Hi, can u please tell me how to calculate the maxworker threads, also the max load of the system.

this needs to be fixed immediately.
plz help
Thanks,

i don't really know of an exact calculation, test it out for your needs and try it

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.