Error "Connection request rejected. Connection limit of '<value>' exceeded" in Policy Server smps.log - SiteMinder
search cancel

Error "Connection request rejected. Connection limit of '<value>' exceeded" in Policy Server smps.log - SiteMinder

book

Article ID: 198329

calendar_today

Updated On:

Products

SITEMINDER CA Single Sign On Agents (SiteMinder) CA Single Sign On Federation (SiteMinder) CA Single Sign On Secure Proxy Server (SiteMinder) CA Single Sign-On CA Single Sign On SOA Security Manager (SiteMinder)

Issue/Introduction

The Policy Server rejects new agent connections and logs the following message to smps.log:

`Connection request rejected. Connection limit of '<value>' exceeded.`

Agents that cannot connect experience an outage. Web Agents return HTTP 500 Agent API errors, and users cannot log in. A Policy Server restart clears the condition temporarily, and the condition returns under load.

Environment

  • SiteMinder Policy Server, all supported versions
  • Linux and Windows

Cause

The connection limit (default 256 concurrent agent connections) sits below the agent load [3]. Worker threads handle IsProtected, IsAuthenticated, and IsAuthorized requests and depend on user directory and database lookups, so higher load requires retuning of thread and connection settings.

Resolution

Policy Server

1. Stop the Policy Server.
2. Back up the registry file.
3. Open `<policy_server_home>/registry/sm.registry` (Linux) or the key `HKEY_LOCAL_MACHINE\SOFTWARE\Netegrity\SiteMinder\CurrentVersion\PolicyServer` (Windows, regedit.exe). The Policy Server Management Console exposes the same settings on the Settings tab [3].
4. Adjust these values [3]:

- Thread Pool Size (console label "Maximum Threads"): default 8, hexadecimal format (for example `0x8`)
- Tcp Max Server Connections (console label "Max Connections"): default 256; raise to fit the expected load (for example `0x100`)
 - PriorityThreadCount: add as a DWORD when missing; default 5, valid range 5 to 20; values outside the range revert to 5

5. On Linux, set the open file descriptor limit (`ulimit -n`) of the account that runs the Policy Server well above the new connection value. Each connection and file handle uses a descriptor, and a low limit causes socket errors [4].
6. Save the registry file and start the Policy Server.
7. Run `smpolicysrv -stats` and confirm the new values are active [5].

Agents

8. Increase `MaxResourceCacheSize` and `MaxSessionCacheSize` so agents cache decisions and send fewer requests [6].

Bootstrap distribution

9. Add several `policyserver=` lines to each agent SmHost.conf for failover during the initial connection. SmHost.conf governs the bootstrap connection only [7].
10. Assign each agent its own Host Configuration Object (HCO) with the Policy Server list in a different order to spread the load. The HCO governs ongoing connections [8].

Directory load balancing

11. Add one User Directory server in the initial Load-Balance Group per 8 worker threads (rule of thumb from the original article; see review notes).
12. For LDAP, raise the Pool Size of the user directory (Infrastructure > Directory > User Directories) from release 12.8.07. Default 1, maximum 32 per directory; Pool Size multiplied by the number of LDAP banks in a failover group stays at or below 64 [9].

Additional Information

  1. Policy Server Management Console

  2. Prepare for the Policy Server Installation

  3. "Server 'Stats' command received" message in the SiteMinder Policy Server smps.log

  4. Web Agent Caches

  5. Configuration Files used by the Web Agent

  6. Host Configuration Objects for Trusted Hosts

  7. Support for LDAP Connection Pool

  8. Recommended maximum number of threads for the SiteMinder Policy Server