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

Zac Spitzer zac.spitzer at gmail.com
Wed Mar 11 22:00:00 EDT 2009


yep I see this kind of thing all the time too....

what is especially annoying is the fact that the process locks up and
can often only be killed by a reboot or using something like zerowave...

it's mapguide really should respond promptly to a service stop request

http://trac.osgeo.org/mapguide/ticket/722
http://trac.osgeo.org/mapguide/ticket/775

but i think the problems are most likely interlinked :)

z



2009/3/7 Jason Birch <Jason.Birch at nanaimo.ca>:
> I think I may be running into this problem when real-life-testing my appl=
ication too.
>
> I have five users, each running 2-3 browser sessions and just panning/zoo=
ming.  After about 15 minutes of this, we started getting connections refus=
ed; first on Fusion calls to things like the legend PHP code, and then on i=
mage 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-interna=
ls-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 m=
ore 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.
> 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 impl=
ementation and found the sockets pool.
>
> But i still have two question:
> 1. How did the MapGuide server control the max connections of each kind o=
f 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 s=
um of sockets are more than 64, the clientAcceptor can accept the connectio=
ns, but the socket read/write operations will fail because the dispatcher c=
an not dispatch more than 64 connections. Am i right?
>
>
>
>>I have not looked deeply into the interaction between the MgClientAccepto=
r
>>class and the ACE::reactor.  It is possible that there may be a limitatio=
n
>>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 w=
eb
>>tier has been designed to pool and reuse the TCP/IP connections between t=
he
>>two processes.  This means a TCP/IP connection is only active when there =
is
>>an actual service request (MgRenderingService, MgMappingService, etc) bei=
ng
>>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 lo=
gic
>>(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 appl=
y
>>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 u=
p
>>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, s=
o
>>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
>>
>>_______________________________________________
>>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
>



--=20
Zac Spitzer -
http://zacster.blogspot.com
+61 405 847 168


More information about the mapguide-internals mailing list