• 0

[C#] WebRequest Limiting Concurrent Connections


Question

I've got a multithreaded application to parse out some imageboards and download images based on custom rules I input. I'm using WebRequest and WebResponse objects to do the downloading.

However, I've hit a problem. It seems that it's limiting the number of concurrent connections per domain to 2. Is there any way to override this and increase the amount?

4 answers to this question

Recommended Posts

  • 0

In its default configuration .NET allows 2 concurrent connections, but you can change that in your configuration file:

<configuration>
  <system.net>;
    <connectionManagement>
      <add address="*" maxConnection="<number of connections>" />
    </connectionManagement>
  </system.net>;
</configuration>

The thing is, its actually part of the HTTP protocol that defines that a client shouldn't issue more than 2 requests at a time:

  Quote
Clients that use persistent connections SHOULD limit the number of simultaneous connections that they maintain to a given server. A single-user client SHOULD NOT maintain more than 2 connections with any server or proxy. A proxy SHOULD use up to 2*N connections to another server or proxy, where N is the number of simultaneously active users. These guidelines are intended to improve HTTP response times and avoid congestion.

Hope that helps.

This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Posts

    • Looks interesting, I love the art style. How many people are working on the game?
    • AMD releases driver 25.8.1 with support for new RX 9060, new games, and more by Taras Buria AMD has a new driver for customers with Radeon graphics cards. Version 25.8.1 WHQL is now available with optimizations for more games and support for the new RX 9060 non-XT graphics card. The update also has plenty of fixed issues and bugs. Here are the update highlights: New Game Support New Game Support for FSR 4 Mafia: The Old Country Mecha BREAK WUCHANG: Fallen Feathers Valorant (Unreal Engine 5 release) Battlefield 6 Open Beta The Alters F1 25 Cyberpunk 2077 WUCHANG: Fallen Feathers Mafia: The Old Country Arena Breakout: Infinite Game of Thrones: Kingsroad Wreckfest 2 Lies of P Fixed issues and bugs include the following: Stutter and lower than expected performance may be observed while playing 4K resolution YouTube videos in Chrome. Intermittent application crash or driver timeout may be observed while playing Monster Hunter Wilds with Radeon Anti-Lag and Instant Replay enabled. Intermittent application crash may be observed while playing Battlefield 2042. Intermittent application crash may be observed while playing Dragon Age: The Veilguard on Radeon RX 9000 series graphics products. Stutter improved while playing Call of Duty: Warzone Season 03 ‘Verdansk’ map on some AMD Graphics Products NOTE: Stutter has been reduced with 25.8.1, and AMD is working with the developer toward a full solution. Texture issues may be observed while using Oculus Rift S on RX 5000 and 6000 series graphics products. And here is the list of known bugs: Corruption may appear while playing Mafia: The Old Country on Radeon RX 6600 series graphics products. Intermittent application crash may be observed while playing The Last of Us Part II on Radeon RX 7900 series graphics products. Intermittent application crash may be observed while playing Call of Duty: Black Ops 6 on Radeon RX 9000 series graphics products. Intermittent application crash or driver timeout may be observed while playing Wuchang: Fallen Feathers with FSR 4 enabled on Radeon™ RX 9000 series graphics products. Intermittent application crash may be observed while playing FBC: Firebreak on some AMD Ryzen processors such as the Ryzen AI 300 series and the Ryzen 7000 series. Intermittent application crash may be observed while playing NBA 2K26 in MyCareer mode on Radeon RX 9070 series graphics products. AMD Radeon Software 25.8.1 is available on 64-bit Windows 10 and 11 systems with supported Radeon graphics cards. You can download it from the official support website. Full release details are available on the same page.
    • Fair shout! But the best way to get this on our news side would be to have Pulasti @LoneWolfSLhave a crack at Early Access when its in a playable state  
    • Interesting. Seems to promote or invite more people to use whatsapp.
    • AI is going to destroy online as well as offline worlds.
  • Recent Achievements

    • First Post
      Aidan Helfrich earned a badge
      First Post
    • Collaborator
      bullgod69 earned a badge
      Collaborator
    • Enthusiast
      Ed B went up a rank
      Enthusiast
    • Reacting Well
      Xinotema earned a badge
      Reacting Well
    • Dedicated
      Edward266 earned a badge
      Dedicated
  • Popular Contributors

    1. 1
      +primortal
      763
    2. 2
      ATLien_0
      187
    3. 3
      +FloatingFatMan
      151
    4. 4
      Xenon
      118
    5. 5
      wakjak
      113
  • Tell a friend

    Love Neowin? Tell a friend!