Thursday, July 14, 2005
Posted on Thursday, July 14, 2005 8:31:37 AM (Mountain Daylight Time, UTC-06:00)  Comments [2] | 
Categories: ArcSDE
So I upgraded our internal development ArcSDE serverfrom 8.3 to 9.0 (so it would be running on my EDN licenses and we could drop the "commercial" license). Anyhow, all went well, and I moved on to other issues (ArcGIS Server development, Ajax-ifying our GeoPortal etc). However, yesterday I noticed that one of our demo sites (http://dev.sanborn.com/kls) decided it was not going to make maps anymore.
:-o


Thus I followed the usual ArcIMS problem solving technique:
Step 1: Restart ArcIMS
Step 2: Re-boot the server.
Step 3: swear and threaten to kick the box

Actually step 3 was look at the logs, which non-specifically (I was only logging errors) indicated the issue was with a map service using ArcSDE. Thus I tried to connect to the instance from ArcCatalog, when low and behold - it popped up with a "No Connections Availible" message.
Luckily, I'd been roaming the GIS blogosphere, and recalled a post over at the ROKTechnologies developers blog about this very thing.

Apparently when you upgrade to 9.0, it handily sets the maximum number of connections to 48. I'm sure that this is noted somewhere in the release notes or elsewhere that any experienced ArcSDE person would completely ignore. Since this is a pretty critical item (i.e. your system will not work as it used to) I'd suggest that ESRI puts this on it's own dialog at the end of the install in bright red - i.e.


NOTICE: WE HAVE SET THE MAX CONNECTIONS TO 48. IF YOU CURRENTLY
USE MORE THAN 48 CONNECTIONS TO ARCSDE, YOU MUST CHANGE THIS SETTING

Anyhow, here's the quick solution:
Step 1: Open the SDE_SERVER_CONFIG table,
Step 2: set the CONNECTIONS value to whatever you want.
Step 3: Restart ArcSDE
This is easier than foolin with loading a defs file etc.

Monday, August 15, 2005 1:54:09 PM (Mountain Daylight Time, UTC-06:00)
Whew! Been there and done that. Wish I would have read this a while back. Would have saved me a lot of headache. When you try to request that 49th connection you really don't get a whole lot of feedback about what ain't working right. The best indicator for me was when catalog wouldn't even connect to things that it had just connected to moments earlier.
I have a hypothesis as to why so many connections are getting eaten up but I have no proof. It goes like this:
1. Some folks have alot of stuff running, so alot of connections, but that aside:
2. Pooled ArcServer objects that have sde connections in them will tie up a connection for each object in the pool, right at the time you start the server object. There also seems to be +1 or +2 SOC processes running on top of that although I don't know if they eat connections.
3. I notice the connection max out the most when I debug AGS code. I think if you are debugging and you bail out (the square) as opposed to following through, you never get to ReleaseContext (i think, maybe finally blocks do execute after a break) so you orphan a process and the associated connections.

Solution: up the max connections sort of solves the problem. Another way is to reboot and clear all the connections. Or kill them manually by PID. Not fun.
KG
Monday, December 12, 2005 8:15:25 PM (Mountain Standard Time, UTC-07:00)
>>Anyhow, here's the quick solution:
>>Step 1: Open the SDE_SERVER_CONFIG table,
>>Step 2: set the CONNECTIONS value to whatever you want.
>>Step 3: Restart ArcSDE
>>This is easier than foolin with loading a defs file etc.

not kowning your Operating System ,if you using a Win NT, it is not so simple ! look at this article first :

http://support.esri.com/index.cfm?fa=knowledgebase.techArticles.articleShow&d=23763

after you chenged the max connections parameter ,you should reallocate the "sharedSectin" in regedit.exe

http://support.esri.com/index.cfm?fa=knowledgebase.techArticles.articleShow&d=23763

wang zhibo
Comments are closed.