[mapguide-internals] How can MapGuide support more than 64 connections on Windows ?

Jason Birch Jason.Birch at nanaimo.ca
Fri Mar 6 12:27:56 EST 2009


I think I may be running into this problem when real-life-testing my =
application too.

I have five users, each running 2-3 browser sessions and just =
panning/zooming.  After about 15 minutes of this, we started getting =
connections refused; first on Fusion calls to things like the legend PHP =
code, and then on image calls, and eventually no calls were succeeding.

I don't know if it's related to this or not:

http://trac.osgeo.org/mapguide/ticket/726

Jason

-----Original Message-----
From: mapguide-internals-bounces at lists.osgeo.org =
[mailto:mapguide-internals-bounces at lists.osgeo.org] On Behalf Of sftp
Sent: February-22-09 9:44 PM
To: MapGuide Internals Mail List
Subject: =BB=D8=B8=B4:RE: [mapguide-internals] How can MapGuide support =
more than 64 connections on Windows ?

Trevor Wekel,
Thank you very much!
Several days ago, I just wanted to know how the MapGuide server controls =
the number of connections for Client,Admin,Site separately.=20
And i found no logic in the source code to limit the max connections for =
the services. So i read the source code of ClientAcceptor,ClientHandler =
and found ACE_Reactor and ACE_WFMO_Reactor ,then my original question =
came up.
=20
Yesterday, i reread the source code and found the MgServerConnection =
implementation and found the sockets pool.
=20
But i still have two question:
1. How did the MapGuide server control the max connections of each kind =
of service (client,admin,site)?
2. Imagine a extreme senario: If there are several WebTier process in =
the same/different machines, and they all have their own socket pool, if =
the sum of sockets are more than 64, the clientAcceptor can accept the =
connections, but the socket read/write operations will fail because the =
dispatcher can not dispatch more than 64 connections. Am i right?



>I have not looked deeply into the interaction between the =
MgClientAcceptor
>class and the ACE::reactor.  It is possible that there may be a =
limitation
>on the number of connections to the server.  From what I remember,
>MgClientAcceptor creates new connections and MgClientHandler handles =
the
>processing for these connections.  Each MgClientHandler operates on a
>separate thread.
>
>>From an architectural perspective, I do not believe this will be a
>performance problem.  The communications channel between the server and =
web
>tier has been designed to pool and reuse the TCP/IP connections between =
the
>two processes.  This means a TCP/IP connection is only active when =
there is
>an actual service request (MgRenderingService, MgMappingService, etc) =
being
>performed.  Once the request is completed, the connection is freed up =
to be
>used by another client.
>
>This means even with a limitation of 64 connections, the MapGuide =
Server
>would be simultaneously processing work on 64 separate threads.  Since =
no
>manufacturer currently makes a machine with more than 24 cores, a 64
>connections/threads limit would still keep the MapGuide Server very =
busy.
>
>Are you trying to solve an issue related to
>http://trac.osgeo.org/mapguide/ticket/726?
>
>I did a quick check on the implementation of the web tier's connection =
logic
>(MgServerConnection, MgServerConnectionStack, etc).  Even though we =
reuse
>connections, it looks as though we do not set a hard limit on the =
number of
>connections a web tier will make to the server.  A large number of =
users
>running very slow operations could force the web tier to create more
>connections than the server can handle.
>
>We could add an additional parameter to webconfig.ini which puts a hard
>limit on the number of connections the web tier will create.  The only
>problem with this approach is that the limit will be per process and =
apply
>to both the mapagent and any implementation of the web extensions (PHP,
>.Net, Java).  This will get a bit tricky when web servers like IIS spin =
up
>multiple instances of these processes.
>
>Thanks,
>Trevor
>
>
>-----Original Message-----
>From: mapguide-internals-bounces at lists.osgeo.org
>[mailto:mapguide-internals-bounces at lists.osgeo.org] On Behalf Of sftp
>Sent: Sunday, February 22, 2009 12:46 AM
>To: mapguide-internals at lists.osgeo.org
>Subject: [mapguide-internals] How can MapGuide support more than 64
>connections on Windows ?
>
>
>I have read the source code and i found that it used ACE::reactor =
default
>implementation ACE_WFMO_Reactor on Windows.=20
>ACE_WFMO_Reactor can only handle no more than 64 handles in one thread, =
so
>how can=20
>MapGuide support more than 64 socket connections?=20
>
>Maybe I didn't understand the source code.=20
>Can anybody help me out?=20
>--=20
>View this message in context:
>http://n2.nabble.com/How-can-MapGuide-support-more-than-64-connections-o=
n-Wi
>ndows---tp2366663p2366663.html
>Sent from the MapGuide Internals mailing list archive at Nabble.com.
>
>_______________________________________________
>mapguide-internals mailing list
>mapguide-internals at lists.osgeo.org
>http://lists.osgeo.org/mailman/listinfo/mapguide-internals
>
>_______________________________________________
>mapguide-internals mailing list
>mapguide-internals at lists.osgeo.org
>http://lists.osgeo.org/mailman/listinfo/mapguide-internals
_______________________________________________
mapguide-internals mailing list
mapguide-internals at lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapguide-internals


More information about the mapguide-internals mailing list