Hi Pramod,
When you start your services, an SDE connection will be made for each number of minimum instances you have set for that service. For example, if the minimum is set to 2, 2 SDE connections will be made.
More instances are created when simultaneous requests are made to the same service, and the amount of requests exceeds the available instances. For example, if 3 requests were made to the same service, and only 2 instances were available, another instance will be created. If there a no instances available, i.e. the max number of instances has been reached, the client will have to wait until an instance is returned to the pool before their request is returned.
What is the minimum number of instances set to for each of your 18 services? If no other users are connecting through any other clients, i.e. ArcMap/ArcCatalog, and you start your 18 services that each have a minimum number of instances set to 2, you should have 36 SDE connections.
Also, when all the users are disconnected from the SDE geodatabase, and all services are stopped, query the sde.sde_process_information table. Check to make sure there are no orphaned connections listed here.
Hi Jake ,
Thanks for the reply. The 40 instances i mentioned are the maximum number of instances that will be created for the 18 map services( each map service has a varied number of max instances ).
This should result in 40 connections made to SQL server. But i see multiple connections getting created for the same instance.
( I varified the process ID of instance and the application establishing connection on database ) .
I did check for orphaned connections. They are none. The 140 connections seen on SQL are when the map services are restarted and there are no applications consuming them.
There may be 3-4 SQL Server connections established for one connection from ArcGIS. This is for performance reasons as it allows operations to occur in parallel. The error message you are seeing about the maxiumum number of connections being reached is from ArcGIS, and not SQL Server (it's connection maxiumum is 32,000+ connections). You can increase the number of geodatabase connections by using the sdeconfig command to update the CONNECTIONS parameter. It defaults to 64. A number larger than this is probably due to ArcGIS server creating additional instances.
-Shannon