Problem: Feature and Metadata Services use 2 and Image Services use 4 ArcSDE connections


My Feature and Metadata Services each use 2 ArcSDE connections, and my Image Service uses 4 ArcSDE connections.


If you take a map or metadata configuration file that was created using an ArcSDE connection, create an ArcIMS Service in Administrator, and then start a Feature or Metadata Service, two ArcSDE connections are made. By default, a virtual FeatureServer or MetadataServer has two instances, thus two connections.

If you start an Image Service, four connections are taken. Like the virtual FeatureServer, the ImageServer has two instances. However, the architecture of the ImageServer also requires two connections for the QueryServer. Thus, the need for four connections.

These connections are taken when you create an ArcIMS Service, it doesn't matter if the Service is stopped or started.

If you do not want all of these connections, you have two options.

Solution or Workaround

  • Change the default number of instances for the virtual server from 2 to 1.

    NOTE: This will compromise your performance.
  • You can set the connectionsharing parameter to allow multiple instances of the FeatureServer, ImageServer, or MetadataServer to share connections to ArcSDE.

    To do this, edit the connectionsharing parameter in the appropriate server configuration file; aimsfs.cfg (FeatureServer), aimsms.cfg (ImageServer), or aimsmd.cfg (MetadataServer).

    These files can be found at <ArcIMS Installation Directory>\Server\etc on Windows and at $AIMSHOME/Server/etc on UNIX.

    By default this parameter is set to 1. If you were to set the parameter to 2 (as seen in the FeatureServer example below), two instances would share one connection to ArcSDE.

    <SERVERCOMPONENT type = "FeatureServer"
    description = "Internet FeatureServer"
    exe = "FeatureServer\aimsfs.dll"
    access = "PUBLIC"
    connectionsharing = "2" >
    <RESOURCEBUNDLE name="aimsfs" path="FeatureServer" />
    <PARAMETER name="type" value="FeatureServer" />

    After this change is made to the server configuration file, you must stop and restart ArcIMS for the change to take effect.

    <a href='https://support.esri.com/en/knowledgebase/techarticles/detail/14360' target='_blank'>How To: Stop and start the ArcIMS services or processes</a>

    NOTE: Changing the connectionsharing parameter from its default could adversely affect performance.