0

I'm trying to run some tests against SignalR so we can use it in our product but first it needs to pass a small load test that ive been set.

What iv done is wrote a small app that basically creates x number of WPF browser controls and points them at my machine.. This works fine which all the JavaScript and everything working..

my problem is that only 2 of the x browser connect to Signal R, ive had a look and apparently its something to do with concurrent connections so I tried setting

  <system.net>
<connectionManagement>
  <add address="*" maxconnection="100" />
</connectionManagement>

but that did not work, I also tried

     ServicePointManager.DefaultConnectionLimit = 200;

that also didnt solve it..

Im pulling my hair out here trying to get it to work! any ideas? I cant exactly do a load test with only 2 connection clients hehe!

some code;

  private void Create(object o)
    {

        for (int i = 0; i < this.Users; i++)
        {
            StressResult result = new StressResult { BrowserInstance = new WebBrowser(), Id = i };

            this.Results.Add(result);
        }

    }

    private void StartRun(object obj)
    {
        foreach (StressResult result in this.Results)
        {
            result.BrowserInstance.Navigate(this.Target);
        }
    }

Create is run first so that the browsers can load, then we finally do the navigation.

svick
  • 236,525
  • 50
  • 385
  • 514
Steoates
  • 3,058
  • 5
  • 27
  • 43
  • This does sound like `ServicePointManager.DefaultConnectionLimit` issue. Are you sure you're setting the value before you make *any* connections (that is, before the `ServicePoint` for your server is created)? – svick Jan 22 '13 at 13:29

1 Answers1

2

Most likely the WPF browser component is a wrapper around the unmanaged Internet Explorer core web browser component. Try to change the registry key as described:

  1. Start Registry Editor.
  2. Locate the following key in the registry: HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings
  3. On the Edit menu, point to New, click DWORD Value, and then add the following registry values: Value name: MaxConnectionsPer1_0Server
    Value data: 10
    Base: Decimal
    Value Name: MaxConnectionsPerServer
    Value data: 10
    Base: Decimal

For Internet Explorer 8 & 9 and global keys as well as GPOs, see the link below.

This is described in this knowledge base article:
How do I configure Internet Explorer to download more than two files at one time?

Also, see this: SignalR and Browser Connection limit

Community
  • 1
  • 1
Magnus Johansson
  • 28,010
  • 19
  • 106
  • 164