"Failed to connect to database. Maximum number of conections to instance exceeded" appears when you connect to the database using arccatalog ".
Temporary solution: 1. Restart the SDE service or delete the gsrvr. EXE process on the machine where the SDE service is located. Final Solution: Modify the maximum number of Sde connections. By default, SDE sets a maximum of 48 connections. Generally, it is impossible for so many users to connect to the graphic database at the same time. In addition, our system and desktop software such as ArcMap or arccatalog will also delete the connection to the database when exiting. But why is the problem of exceeding the maximum number of connections still occurring? After several attempts, we found that when the system unexpectedly exits or the network cable is forcibly removed when a database is connected. Records such as the connection process on the SDE server and the number of Sde user connections recorded in the database cannot be deleted. As a result, more and more invalid connections eventually reach their limits, and errors are inevitable. Method 1: Use PLSQL or toad to open the sever_config table under the SDE user, and edit the connections field value to your maximum number of connections. Set the value of tcpkeepalive to true. Method 2: Open the installation directory of Sde (generally the installation path is c: \ ArcGIS \ ArcSDE \ sqlexe \ etc) giomgr. edit the defs file and set the connections parameter to your maximum number of connections. Set the tcpkeepalive parameter to true. Run the following command to import data to the database: sdeconfig-O import-f c: \ ArcGIS \ ArcSDE \ sqlexe \ etc \ giomgr. defs-I esri_sde (database instance name)-S (servername)-u SDE (User Name)-P SDE (password ). After the settings, you must restart the SDE service to make the settings take effect.
What is the tcpkeepalive parameter used? The greatest hero who can delete invalid connections is him. When the tcpkeepalive parameter is set to true, the database continuously detects whether all connections are invalid connections based on the response time provided by the registry entry KeepAliveTime of the server where the SDE service is located, the connection is automatically deleted. The KeepAliveTime registry does not exist for machines that install the operating system by default. If no, the server will not actively send keepalive data packets to confirm whether the idle connection remains unchanged. No deletion operation will be performed. Therefore, the number of invalid connections mentioned above will increase. You can add the DWORD entry: KeepAliveTime in the following path: LOCAL_MACHINE \ System \ CurrentControlSet \ Services \ Tcpip \ Parameters. If no value is set, the default value is two hours. The specific time depends on the situation. Generally, it is recommended to be 5 minutes. Then restart the machine (you must restart the registry before the new entry takes effect ). The world is now quiet, and the mistake of exceeding the maximum number of connections will no longer bother you.
I saw an article dedicated to why the maximum number of connections of the SDE service in Windows is 48. It turns out that Windows has allocated a fixed size of memory for each service (512 KB by default ). Each SDE process requires about 9 KB of memory, so the default SDE connection is 512/9 or about 48.
From: http://blog.sina.com.cn/s/blog_5d25ac4e0100sp7p.html