Add rspec for maxConnections
Fix a problem exceeding the maximum number of connections