[mapguide-commits] r4595 - in sandbox/adsk/2.2gp: Common/MapGuideCommon/Services Oem/ACE/ACE_wrappers/ace Server/src/Common/Manager Server/src/Core Web/src

svn_mapguide at osgeo.org svn_mapguide at osgeo.org
Fri Feb 12 16:42:30 EST 2010


Author: brucedechant
Date: 2010-02-12 16:42:29 -0500 (Fri, 12 Feb 2010)
New Revision: 4595

Modified:
   sandbox/adsk/2.2gp/Common/MapGuideCommon/Services/ServerConnectionStack.cpp
   sandbox/adsk/2.2gp/Oem/ACE/ACE_wrappers/ace/config.h
   sandbox/adsk/2.2gp/Server/src/Common/Manager/ServerManager.cpp
   sandbox/adsk/2.2gp/Server/src/Core/Server.cpp
   sandbox/adsk/2.2gp/Web/src/webconfig.ini
Log:
Fix for trac ticket 1272 - Change ACE WFMO reactor used by Windows to the ACE SELECT reactor
http://trac.osgeo.org/mapguide/ticket/1272

Notes:
- Changed the ACE reactor used on Windows to the same one as used on Linux


Modified: sandbox/adsk/2.2gp/Common/MapGuideCommon/Services/ServerConnectionStack.cpp
===================================================================
--- sandbox/adsk/2.2gp/Common/MapGuideCommon/Services/ServerConnectionStack.cpp	2010-02-12 20:42:43 UTC (rev 4594)
+++ sandbox/adsk/2.2gp/Common/MapGuideCommon/Services/ServerConnectionStack.cpp	2010-02-12 21:42:29 UTC (rev 4595)
@@ -42,11 +42,16 @@
         MgConfigProperties::SiteConnectionPropertyPort, sitePort,
         MgConfigProperties::DefaultSiteConnectionPropertyPort);
 
+    // Note: The comment below only applies if using the ACE WFMO reactor on Windows.
+    //       The ACE config.h file has been updated to use the ACE SELECT reactor on 
+    //       Windows which is the default reactor used on Linux.
+    //       ie: #define ACE_USE_SELECT_REACTOR_FOR_REACTOR_IMPL
+    //
     // Assign an appropriate number of connections for each connection type.  On Windows
     // we are limited to 62 connections and will typically have one mapagent and one
     // API process running.  Limiting the number of connections to 20 per process should give
     // adequate headroom to handle CLOSE_WAIT states.  Twelve actively processing client connections
-    // should easily saturate an eight core machine.
+    // should easily saturate a quad core machine depending on load.
     if (port == adminPort)
     {
         // Pull max connections from admin section.  Default to 2 admin connections if not present.

Modified: sandbox/adsk/2.2gp/Oem/ACE/ACE_wrappers/ace/config.h
===================================================================
--- sandbox/adsk/2.2gp/Oem/ACE/ACE_wrappers/ace/config.h	2010-02-12 20:42:43 UTC (rev 4594)
+++ sandbox/adsk/2.2gp/Oem/ACE/ACE_wrappers/ace/config.h	2010-02-12 21:42:29 UTC (rev 4595)
@@ -1,4 +1,5 @@
 #ifdef WIN32
+#define ACE_USE_SELECT_REACTOR_FOR_REACTOR_IMPL
 #define ACE_HAS_WCHAR
 #define ACE_USES_WCHAR
 #include "ace/config-win32.h"

Modified: sandbox/adsk/2.2gp/Server/src/Common/Manager/ServerManager.cpp
===================================================================
--- sandbox/adsk/2.2gp/Server/src/Common/Manager/ServerManager.cpp	2010-02-12 20:42:43 UTC (rev 4594)
+++ sandbox/adsk/2.2gp/Server/src/Common/Manager/ServerManager.cpp	2010-02-12 21:42:29 UTC (rev 4595)
@@ -936,10 +936,14 @@
     m_totalConnections++;
 
 #ifdef _WIN32
-    // The limit for the current Windows ACE reactor is 62.
+    // The ACE SELECT reactor does not have the same handle limit as the ACE WFMO reactor.
+    // The code below is left as is, but commented out in case the ACE WFMO reactor is ever used in the future.
+
+    // The limit for the default Windows ACE WFMO reactor is 62 handles this is due to the 64 handle limit of 
+    // the Windows WaitForMultipleObjects() API, but ACE uses 2 handles internally leaving only 62 handles for the application.
     // The only reason the value 55 is chosen is because it is slightly under this value and
     // so we can log an error as the # of active connections approaches the current ACE reactor limit.
-    // TODO: This error logging will need to be revisited if a different ACE reactor is used on Windows.
+/*
     if(m_totalActiveConnections.value() > 55)
     {
         STRING strActiveConnections = L"";
@@ -951,6 +955,7 @@
         // We are dangerously close to exceeding the safe # of active connections for the current ACE reactor
         MG_LOG_ERROR_ENTRY(message.c_str());
     }
+*/
 #else
     // Linux uses a different ACE reactor and so this error message doesn't apply.
 #endif

Modified: sandbox/adsk/2.2gp/Server/src/Core/Server.cpp
===================================================================
--- sandbox/adsk/2.2gp/Server/src/Core/Server.cpp	2010-02-12 20:42:43 UTC (rev 4594)
+++ sandbox/adsk/2.2gp/Server/src/Core/Server.cpp	2010-02-12 21:42:29 UTC (rev 4595)
@@ -726,6 +726,9 @@
         if(svc_handle_)
         {
             report_status(SERVICE_RUNNING);
+
+            // We need to make this thread the owner of the ACE reactor
+            ACE_Reactor::instance()->owner(ACE_Thread::self());
         }
         #endif
 

Modified: sandbox/adsk/2.2gp/Web/src/webconfig.ini
===================================================================
--- sandbox/adsk/2.2gp/Web/src/webconfig.ini	2010-02-12 20:42:43 UTC (rev 4594)
+++ sandbox/adsk/2.2gp/Web/src/webconfig.ini	2010-02-12 21:42:29 UTC (rev 4595)
@@ -66,6 +66,10 @@
 #
 # Property Name                    Description
 # -----------------------------------------------------------------------------
+# MaxConnections                   The maximum allowed concurrent connections for this port.
+#                                  Default value of 2 is for a typical load when the web 
+#                                  is connected to a quad core server machine.
+#
 # Port                             The port to use for administration operations
 #
 #                                  WARNING: If you change the port # here you
@@ -74,6 +78,7 @@
 #                                           file.
 #
 # *****************************************************************************
+MaxConnections                     = 2
 Port                               = 2810
 
 [ClientConnectionProperties]
@@ -82,6 +87,10 @@
 #
 # Property Name                    Description
 # -----------------------------------------------------------------------------
+# MaxConnections                   The maximum allowed concurrent connections for this port.
+#                                  Default value of 12 is for a typical load when the web 
+#                                  is connected to a quad core server machine.
+#
 # Port                             The port to use for client operations
 #
 #                                  WARNING: If you change the port # here you
@@ -90,6 +99,7 @@
 #                                           file.
 #
 # *****************************************************************************
+MaxConnections                     = 12
 Port                               = 2811
 
 [SiteConnectionProperties]
@@ -100,6 +110,11 @@
 # -----------------------------------------------------------------------------
 # IpAddress                        The IP address of the site server
 #                                       0 < Length <= 255
+#
+# MaxConnections                   The maximum allowed concurrent connections for this port.
+#                                  Default value of 6 is for a typical load when the web 
+#                                  is connected to a quad core server machine.
+#
 # Port                             The port to use for site operations
 #
 #                                  WARNING: If you change the port # here you
@@ -109,6 +124,7 @@
 #
 # *****************************************************************************
 IpAddress                          = 127.0.0.1
+MaxConnections                     = 6
 Port                               = 2812
 
 [AgentProperties]



More information about the mapguide-commits mailing list