SRM Connection or Session Limit Reached
***Scroll down for the Update***

Have you ran into one of these errors before:

     [exec] AxisFault
     [exec]  faultCode: ServerFaultCode
     [exec]  faultSubcode: 
     [exec]  faultString: fault.drextapi.fault.ConnectionLimitReached.summary
     [exec]  faultActor: 
     [exec]  faultNode: 
     [exec]  faultDetail: 
     [exec]     {urn:srm0}SrmFaultConnectionLimitReachedFault:<connectionlimit>10</connectionlimit>
     [exec] fault.drextapi.fault.ConnectionLimitReached.summary


     [exec] AxisFault
     [exec]  faultCode: ServerFaultCode
     [exec]  faultSubcode: 
     [exec]  faultString: dr.fault.SessionLimitExceeded
     [exec]  faultActor: 
     [exec]  faultNode: 
     [exec]  faultDetail: 
     [exec] 	{urn:srm0}MethodFaultFault:<vim25:reason>Invalid fault</vim25:reason>
     [exec] dr.fault.SessionLimitExceeded
     [exec] 	at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
     [exec] 	at sun.reflect.NativeConstructorAccessorImpl.newInstance(
     [exec] 	at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(

Or in the GUI:Lost connection to remote SRM server. Unable to login. The maximum number of SRM users has been reached.RJ, from, & I had been plagued by these messages for weeks, maybe even months. Well, we finally got it all figured out!

Keep reading for the fix!

Googling showed absolutely nothing. These two faults are actually different and separate, and not related to each other (the second fault is related to the GUI error). The ConnectionLimitReached fault is related directly to external API, and SessionLimitExceeded fault is related to the GUI sessions and how many are logged into vCenter & SRM. If you’re developing your own app using the SDK/API, you can see both errors, but make sure you understand where each came from.

What’s the difference?

ConnectionLimitReached is how many active connections you have to the External API, which you’ll only see when developing your own app to talk to SRM via the SDK/API. The default for this is 10, and there’s no mention of it anywhere, except your fault code. SessionLimitExceeded is when the total number of connections in SRM has been reached, which the default of this is 45. This is an aggregate of API & GUI connections, so your app plus SRM administrators logged in, or just your administrators logged in. When you log into the GUI and connect to SRM, it spawns multiple connections, thus compounding sessions, reaching it faster than you’d think.

Increasing Connection Limit and Session Limit

To fix the ConnectionLimitReached fault, you can add “<“connectionLimit”>”##”<“/connectionLimit”>” to the vmware-dr.xml file inside the “<“ExternalAPI”>” tag to increase the connection limits. Here’s an example of the vmware-dr.xml file with the limit of 50 added:


After adding that, we haven’t seen seen the ConnectionLimitReached fault anymore.

In order to fix the SessionLImitExceeded fault, change sessionLimit in the connections tag. I set it to 90, default is 45, and haven’t had any issues. That setting is like this:


***UPDATE August 20, 2013***

After weeks more of testing, we’ve hit another limit of 50 sessions, despite changing the above settings. The error in the SRM log looked like this:

[03416 verbose 'HttpConnectionPool-000000'] [IncConnectionCount] Cannot increment number of connections to  as max connections (50) already in use

VMware took a while to get back to us, but when they did, here’s what they said:

While this looks like a problem where vCenter is not letting SRM have enough connections, it is actually SRM anticipating vCenter limiting that and limiting the connections before vCenter does.

That isn’t what I expected, but it makes sense, especially coupled with the fix.

The limit we were hitting was the default HTTP connection pool limit of 50, which is what throttles the number of connections. You’ll need to edit vmware-dr.xml and change defaultClientPoolConnectionsPerServer in the vmacore http section. Since the default is 50, doubling it should suffice. One thing to note is the parameter defaultClientPoolSize, which it’s default is 200. This parameter needs to be larger than defaultClientPoolConnectionsPerServer.

I hope this helps anyone out there running into these limits. Happy scripting!