[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:



-----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.
Yesterday, i reread the source code and found the MgServerConnection =
implementation and found the sockets pool.
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 =
>class and the ACE::reactor.  It is possible that there may be a =
>on the number of connections to the server.  From what I remember,
>MgClientAcceptor creates new connections and MgClientHandler handles =
>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 =
>tier has been designed to pool and reuse the TCP/IP connections between =
>two processes.  This means a TCP/IP connection is only active when =
there is
>an actual service request (MgRenderingService, MgMappingService, etc) =
>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 =
>would be simultaneously processing work on 64 separate threads.  Since =
>manufacturer currently makes a machine with more than 24 cores, a 64
>connections/threads limit would still keep the MapGuide Server very =
>Are you trying to solve an issue related to
>I did a quick check on the implementation of the web tier's connection =
>(MgServerConnection, MgServerConnectionStack, etc).  Even though we =
>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 =
>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 =
>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 =
>multiple instances of these processes.
>-----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 =
>implementation ACE_WFMO_Reactor on Windows.=20
>ACE_WFMO_Reactor can only handle no more than 64 handles in one thread, =
>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
>View this message in context:
>Sent from the MapGuide Internals mailing list archive at Nabble.com.
>mapguide-internals mailing list
>mapguide-internals at lists.osgeo.org
>mapguide-internals mailing list
>mapguide-internals at lists.osgeo.org
mapguide-internals mailing list
mapguide-internals at lists.osgeo.org

More information about the mapguide-internals mailing list