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

Trevor Wekel trevor_wekel at otxsystems.com
Sun Feb 22 09:01:18 EST 2009


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. 
ACE_WFMO_Reactor can only handle no more than 64 handles in one thread, so
how can 
MapGuide support more than 64 socket connections? 

Maybe I didn't understand the source code. 
Can anybody help me out? 
-- 
View this message in context:
http://n2.nabble.com/How-can-MapGuide-support-more-than-64-connections-on-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



More information about the mapguide-internals mailing list