Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > MaxConnections

Reply
Thread Tools

MaxConnections

 
 
MattC
Guest
Posts: n/a
 
      05-14-2007
I've written an HTTPHandler that implements IHttpAsyncHandler. This handler
makes a call to a webservice that will send back a byte[] to be sent back to
the webrowser as an image.

I've set the maxconnections setting on the web.config for the handler and
the webservice to:

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

But when debugging I can see that it is still only making 2 requests at a
time. How can I make a handler that will allow for more than 2 requests at
a time.

TIA






 
Reply With Quote
 
 
 
 
Aidy
Guest
Posts: n/a
 
      05-14-2007
Someone correct me if I'm wrong, but there is a limit at the TCP/IP layer
that means you can only have two TCP/IP connections to the same machine on
the same port at a time. Point IE at a graphic-heavy site and you'll see it
downloads images 2 at a time. As this limit is at the TCP/IP layer you
can't control it from IIS or ASP.

"MattC" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> I've written an HTTPHandler that implements IHttpAsyncHandler. This
> handler makes a call to a webservice that will send back a byte[] to be
> sent back to the webrowser as an image.
>
> I've set the maxconnections setting on the web.config for the handler and
> the webservice to:
>
> <system.net>
> <connectionManagement>
> <add address="*" maxconnection="20"/>
> </connectionManagement>
> </system.net>
>
> But when debugging I can see that it is still only making 2 requests at a
> time. How can I make a handler that will allow for more than 2 requests
> at a time.
>
> TIA
>
>
>
>
>
>



 
Reply With Quote
 
 
 
 
Juan T. Llibre
Guest
Posts: n/a
 
      05-14-2007
Windows Server 2003 SP1 removed the need to set a higher limit for maxconnections.

The number of simultaneous connections in W2K3 SP1 is now limited
only by available system resources or the MaxConnections registry entry.

You *can* set a higher number of connections in an unpatched Windows Server 2003:

Registry path
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Servic es\HTTP\Parameters

Registry entry
MaxConnections

Value Type
DWORD

Valid data value ranges for this entry are 0 to 4294967295.

Matt, you seem to have a typo :

<add address="*" maxconnection="20"/>

That should be :
<add address="*" maxconnections="20"/>

In any case, if you're running an unpatched W2K3, try setting the registry entry, per the above.






Juan T. Llibre, asp.net MVP
asp.net faq : http://asp.net.do/faq/
foros de asp.net, en espaņol : http://asp.net.do/foros/
======================================
"Aidy" <(E-Mail Removed)> wrote in message news:(E-Mail Removed)...
> Someone correct me if I'm wrong, but there is a limit at the TCP/IP layer that means you can only
> have two TCP/IP connections to the same machine on the same port at a time. Point IE at a
> graphic-heavy site and you'll see it downloads images 2 at a time. As this limit is at the TCP/IP
> layer you can't control it from IIS or ASP.



> "MattC" <(E-Mail Removed)> wrote in message news:(E-Mail Removed)...
>> I've written an HTTPHandler that implements IHttpAsyncHandler. This handler makes a call to a
>> webservice that will send back a byte[] to be sent back to the webrowser as an image.
>>
>> I've set the maxconnections setting on the web.config for the handler and the webservice to:
>>
>> <system.net>
>> <connectionManagement>
>> <add address="*" maxconnection="20"/>
>> </connectionManagement>
>> </system.net>


>> But when debugging I can see that it is still only making 2 requests at a time. How can I make a
>> handler that will allow for more than 2 requests at a time.
>>
>> TIA



 
Reply With Quote
 
MattC
Guest
Posts: n/a
 
      05-14-2007
Juan,

Thanks but the limit is impossed by the web browsers request queue in this
case. So IE only ever makes 2 concurrent requests and will block until each
requests returns before sending the next.

I did find that altering:

HKEY_CURRENT_USER\Software\Microsoft\Windows\Curre ntVersion\Internet
Settings\MaxConnectionsPerServer

and setting to 20 odd really helps, but that isn't somethign I can tell
users to do :s

Also I'm using .NET2.0 so the system.net entry is maxconnection, it
complains of unknown attribute with maxconnectionS.

regards

Matt
"Juan T. Llibre" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> Windows Server 2003 SP1 removed the need to set a higher limit for
> maxconnections.
>
> The number of simultaneous connections in W2K3 SP1 is now limited
> only by available system resources or the MaxConnections registry entry.
>
> You *can* set a higher number of connections in an unpatched Windows
> Server 2003:
>
> Registry path
> HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Servic es\HTTP\Parameters
>
> Registry entry
> MaxConnections
>
> Value Type
> DWORD
>
> Valid data value ranges for this entry are 0 to 4294967295.
>
> Matt, you seem to have a typo :
>
> <add address="*" maxconnection="20"/>
>
> That should be :
> <add address="*" maxconnections="20"/>
>
> In any case, if you're running an unpatched W2K3, try setting the registry
> entry, per the above.
>
>
>
>
>
>
> Juan T. Llibre, asp.net MVP
> asp.net faq : http://asp.net.do/faq/
> foros de asp.net, en espaņol : http://asp.net.do/foros/
> ======================================
> "Aidy" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed)...
>> Someone correct me if I'm wrong, but there is a limit at the TCP/IP layer
>> that means you can only
>> have two TCP/IP connections to the same machine on the same port at a
>> time. Point IE at a
>> graphic-heavy site and you'll see it downloads images 2 at a time. As
>> this limit is at the TCP/IP
>> layer you can't control it from IIS or ASP.

>
>
>> "MattC" <(E-Mail Removed)> wrote in message
>> news:(E-Mail Removed)...
>>> I've written an HTTPHandler that implements IHttpAsyncHandler. This
>>> handler makes a call to a
>>> webservice that will send back a byte[] to be sent back to the webrowser
>>> as an image.
>>>
>>> I've set the maxconnections setting on the web.config for the handler
>>> and the webservice to:
>>>
>>> <system.net>
>>> <connectionManagement>
>>> <add address="*" maxconnection="20"/>
>>> </connectionManagement>
>>> </system.net>

>
>>> But when debugging I can see that it is still only making 2 requests at
>>> a time. How can I make a
>>> handler that will allow for more than 2 requests at a time.
>>>
>>> TIA

>
>



 
Reply With Quote
 
Cowboy \(Gregory A. Beamer\)
Guest
Posts: n/a
 
      05-14-2007
If I am undestanding correctly, you are talking about client connections,
and not server connections?

If so, this is an IE thing and can be altered only through the registry with
the Internet Settings\MaxConnectionsPerServer key.

I see Juan has jumped in as well. If it is server side, and you are using
Windows Server 2003, I would go there first.

--
Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBA
http://gregorybeamer.spaces.live.com

*********************************************
Think outside the box!
*********************************************
"MattC" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> I've written an HTTPHandler that implements IHttpAsyncHandler. This
> handler makes a call to a webservice that will send back a byte[] to be
> sent back to the webrowser as an image.
>
> I've set the maxconnections setting on the web.config for the handler and
> the webservice to:
>
> <system.net>
> <connectionManagement>
> <add address="*" maxconnection="20"/>
> </connectionManagement>
> </system.net>
>
> But when debugging I can see that it is still only making 2 requests at a
> time. How can I make a handler that will allow for more than 2 requests
> at a time.
>
> TIA
>
>
>
>
>
>


 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
MaxConnections questions and issues Curtis Justus ASP .Net Web Services 0 03-21-2007 09:33 PM



Advertisments