InfiniTec - Henning Krauses Blog

Don't adjust your mind - it's reality that is malfunctioning

More than two concurrent downloads in Internet Explorer

Affected products

Summary

This article describes how the Internet Explorer can be configured, so that it allows for more than two concurrent downloads.

Description

Normally, the Internet Explore does only two files at a time from one server. The number of paralell downloads can, however, be altered.

Solution

To change the behavior of the Internet Explorer, the following steps are necessary:
  1. Open the registry editor.
  2. Navigate to the key HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings.
  3. Create a new value of type DWord called MaxConnectionsPerServer.
  4. Create a new value of type DWord called MaxConnectionsPer1_0Server.
  5. Open the values and enter the maximum number of concurrent downloads.
  6. After the Internet Explorer has been restarted, the new setting becomes active.

Status

This behavior is by design.

Posted by Henning Krause on Friday, December 31, 2004 2:20 PM, last modified on Saturday, November 27, 2010 5:42 AM
Permalink | Post RSSRSS comment feed

HttpWebRequest fails when several connections are made concurrently

Affected products

  • .NET Framework 1.0
  • .NET Framework 1.1

Summary

When making several connections concurrently with the HttpWebRequest class, the request objects fail with an exception.

Symptoms

When making several connections concurrently (more than 12 on a single processor machine) with the HttpWebRequest class, the request objects fail with an exception.
If these calls are made from methods running on ThreadPool thhreads, the maximum number of connections is further reduced.

Cause

The HttpWebRequest uses two threads for each connection from the ThreadPool. This pool has a maximal capacity of 25 on one processor machines. Regularly, if the pool is full, it would queue further requests. But the HttpWebRequest class checks whether two threads are available before putting its requests into the queue. It fails with an exception, when there are less than two threads available.

Status

This behaviour is by design.

Solution

Keep concurrent connections as low as possible, and don't initiate requests from methods running on ThreadPool threads.

Other information

To keep the concurrent connections low, you can use the Advanced Threadpool from the Toolbox area of this page. This class implements a thread pool, which is independent of the ThreadPool class. With this class, you can set the maximium number of concurrent threads, so that the limit of the ThreadPool is never reached.

Posted by Henning Krause on Friday, December 31, 2004 1:09 PM, last modified on Friday, December 31, 2004 1:10 PM
Permalink | Post RSSRSS comment feed