I am trying to write a simple load tester for one of our web services that feeds through IIS7. I start downloading threads (as tasks) that invoke the web service as a web link.
Despite the fact that all streams are running, only the web service can handle only 2 simultaneous connections from the application.
I know that by specification, concurrent connections are limited to 2 per user . For this load tester, which I believe is one of the users , I would like to open many simultaneous connections.
I tried adding the following to the web.config web service.
<system.net> <connectionManagement> <add address="*" maxconnection="40"/> </connectionManagement> </system.net>
My setup is as follows:
The web service is located at http: //devserver/MyWebServiceApp/MyWebService.asmx , where MyWebServiceApp is configured as an application.
The web method can be considered as something trivial that just waits, say, 20 seconds before the response returns (which makes it easy to see that only one connection is open at any given time).
The simplest form of load tester code is:
Imports System.Threading.Tasks Module SuperBasicLoadTester Sub Main() ThreadLauncher(10) End Sub Sub ThreadLauncher(ByVal numberOfThreads As Integer) Dim tasks(numberOfThreads - 1) As Task For index As Integer = 0 To numberOfThreads - 1 tasks(index) = Task.Factory.StartNew(AddressOf SendRequest) Next Task.WaitAll(tasks) End Sub Sub SendRequest() Dim myWebServiceCaller As New MyWebService.ServiceMethods myWebServiceCaller.Url = "http://devserver/MyWebServiceApp/MyWebService.asmx" Dim response As String = myWebServiceCaller.MyWebServiceMethod("Some string passed to the web service method") End Sub End Module
I tried to specify other load testing software (e.g. soapUI ) in the web service and observed the same problem.
I would appreciate any guidance on how to increase this connection limit (for testing purposes).
Editing:
- I must add that Windows 2008 R2 is running in the web service window.
- I also ran SoapUI and my loadtester at the same time, and each of them is only able to request 2 connections each (i.e. a total of 4).
Thanks in advance,
Ali
alergy
source share