Number of connections to instance

10345
17
03-21-2012 07:04 AM
Regular Contributor
installed SQLServer Express and enabled GDB storage using our ArcEditor (Desktop - Standard) License.

Few questions regarding the number of connections to the SQL Server instance, named "sqldb"

Lets say I create/publish a .mxd using data from a SDE gdb stored in sqldb.

How many clients can simultaneously connect to the service to view the data (read only)?

ArcGIS desktop -- client #1
ArcGIS online mapA -- client #2
ArcGIS online mapB -- client #3
JavascriptAPI custom map -- client #4  <---will this client receive the 'maximum number of connections to instance exceeded'?

thanks!
Reply
0 Kudos
17 Replies
Esri Esteemed Contributor
Hi Dan,

A database connection is made for each ArcGIS Server instance (ArcSOC.exe) that is created for the service(s).  The min and max number of instances can be set by right-clicking on the service > Service Properties > Pooling tab.  By default, the minimum number of instances is set to 1 and the maximum is set to 2.  Therefore, when you start the service 1 connection is made to the SDE geodatabase.

By default, an instance is created as Pooled.  This means when a request (ie pan/zoom in web app) is made to the service, an instance is taken from the pool, and then returned when the request is over. Once another request is made, say from another web app, that same instance can be used for that service request.  So, multiple requests will need to be made at the same time in order for another instance to be created, thus creating another connection to the SDE geodatabase.  This will not exceed the maximum number of instances, so by default a service can never exceed two connections to the geodatabase unless this paramter is increased.  If the max number of instances is exceeded, the client will have to wait until an instance is returned to the pool before their request is returned.

Say the max instances of a service is set to two and both are being used, creating two connections to the SDE geodatabase.  Then one of the users is finished accessing the service. The second SDE connection will remain until the idle time expires (set within the Services Properties > Pooling tab).  Once the idle time expires, the instance will be removed from the server and the connection deleted from the SDE geodatabase.
Regular Contributor
Hi Dan,

A database connection is made for each ArcGIS Server instance (ArcSOC.exe) that is created for the service(s).  The min and max number of instances can be set by right-clicking on the service > Service Properties > Pooling tab.  By default, the minimum number of instances is set to 1 and the maximum is set to 2.  Therefore, when you start the service 1 connection is made to the SDE geodatabase.

By default, an instance is created as Pooled.  This means when a request (ie pan/zoom in web app) is made to the service, an instance is taken from the pool, and then returned when the request is over. Once another request is made, say from another web app, that same instance can be used for that service request.  So, multiple requests will need to be made at the same time in order for another instance to be created, thus creating another connection to the SDE geodatabase.  This will not exceed the maximum number of instances, so by default a service can never exceed two connections to the geodatabase unless this paramter is increased.  If the max number of instances is exceeded, the client will have to wait until an instance is returned to the pool before their request is returned.

Say the max instances of a service is set to two and both are being used, creating two connections to the SDE geodatabase.  Then one of the users is finished accessing the service. The second SDE connection will remain until the idle time expires (set within the Services Properties > Pooling tab).  Once the idle time expires, the instance will be removed from the server and the connection deleted from the SDE geodatabase.


thanks for the reply.

Now I see why the max. # of instances is set to 2 by default.

total connections to personal SDE gdb = 3; ArcSOC gets 2, one left for local editing in desktop envir.
Reply
0 Kudos
Regular Contributor
Still having 'max number of connections to instance exceeded' problems...

At the time I originally posted, I was using the ArcGIS-Desktop Standard License for the ArcSDE install; thus, I only had ArcSDE Personal with 3 connection limit.

Since then, I activated ArcSDE using the ArcGIS-Server Standard License and now, right click/properties on the db server in ArcCatalog, it displays "Class: ArcSDE Workgroup Server", which I *think* gets 10 connections?


Here's my connection list to the SDE GDB:

gdb_A --- Rest Service 1 (instances in use/running: 0/1)
gdb_A --- Rest Service 2 (instances in use/running: 0/2)
gdb_A --- Attempt to connect to the sde gdb via ArcCatalog <---Failed to connect, Max. # of connections exceeded.

Why does this happen, I have ArcSDE Workgroup, shouldn't I get 10 connections? I can only total up 3 above, and the ArcCatalog connection would be 4 ??

thanks!
Reply
0 Kudos
Esri Esteemed Contributor
Execute the Setup.exe for ArcSDE and only check the option 'Enable geodatabase storage on SQL Server Express'.  After you complete the wizard, detach and then reattach the database using ArcCatalog. 

If you still cannot make more than 3 connections, try creating a new geodatabase and test to see if you can make more than 3 connections.
Reply
0 Kudos
Regular Contributor
The gdb I'm connecting to was created when I was using the SDE personal license; now, after i've switched to an SDE Workgroup license, it seems like the gdb still only accepts the max. # of personal license  connections; almost as if this wasn't updated.

I'll try creating new gdb and see what happens.
Reply
0 Kudos
Occasional Contributor III
The gdb I'm connecting to was created when I was using the SDE personal license; now, after i've switched to an SDE Workgroup license, it seems like the gdb still only accepts the max. # of personal license  connections; almost as if this wasn't updated.


That's expected; the license doesn't get updated in individual geodatabases until you detach then re-attach them.

http://help.arcgis.com/en/arcgisdesktop/10.0/help/index.html#/Changing_license_keys_for_database_ser...
Reply
0 Kudos
New Contributor III
Dear Colleagues;

I've read a lot of topics in the ESRI's forums and I'm confused yet. When I try to use the data via Database Connections it returns the error "maximum number of instances exceeded". Let me give you a context information.
I have a map service running and consuming ArcSDE Geodatabase data. When I right-click at the Database Server Connection in Catalog>Properties we see "Class: ArcSDE Personal Server". So, when my colleague try to do the same she have yhis error message. But we have, theoretically, only 2 connections: my connection in  catalog and the the connection of the map service running. What is wrong here? ArcSOC consume more than one instance of sql?

Please, any ideas will be appreciated.

My best regards.
Reply
0 Kudos
Esri Esteemed Contributor
SOC connections can consume as many connections that the service's max instance is set to.  You can check this by right-clicking on the service > Service Properties > Pooling tab.  If the max is set to 2, and two users are using the service concurrently, then this will spawn two SOC connections within the geodatabase.  See my post above for a more in depth explanation.
Reply
0 Kudos
New Contributor III
SOC connections can consume as many connections that the service's max instance is set to.  You can check this by right-clicking on the service > Service Properties > Pooling tab.  If the max is set to 2, and two users are using the service concurrently, then this will spawn two SOC connections within the geodatabase.  See my post above for a more in depth explanation.


Thanks JSkinn3.

So, if I set the pooled service maximum connections to 1 (one) it will use only one connection to database? If it is correct, so me and my colleague have read access to the database, right? The case is: I have this sql geodatabase that is consumed by the web map service, can we (me and one user) access it to read (and one of us write)?

Thanks in advance
Reply
0 Kudos