Access Gateway error: "Server ran out of threads to serve requests. Consider raising the ThreadsPerChild setting" - SiteMinder
search cancel

Access Gateway error: "Server ran out of threads to serve requests. Consider raising the ThreadsPerChild setting" - SiteMinder

book

Article ID: 269027

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

Issue/Introduction

The Access Gateway goes down frequently and stops accepting connections, so users cannot reach the back-end applications.
No front-end traffic is logged in httpd.log. Instead, entries similar to the following are repeated:

  No connections available for [{s}->https://xyz.example.com:443] Found In-Use = true

(Sample entries: 05/16/2023 19:52:23, PID 18464, thread IDs 572, 13112 and 10600.)

Environment

SiteMinder Access Gateway, all supported releases (observed on 12.8.x).

Cause

All of the worker threads of the Access Gateway HTTPD (Apache) component are in use, so no thread is left to accept new
client requests for the back-end host. [1]

The Apache error log (mpm_winnt) shows the thread limit being reached, followed by failed accept operations:

  06/02/2023 18:37:17 [mpm_winnt:notice] pid 12996:tid 464   AH00354: Child: Starting 150 worker threads.
  06/05/2023 11:17:47 [mpm_winnt:error]  pid 12996:tid 4344  AH00326: Server ran out of threads to serve requests. Consider raising the ThreadsPerChild setting
  06/05/2023 11:18:00 [mpm_winnt:warn]   pid 12996:tid 4344  (OS 64)The specified network name is no longer available.
                                                             AH00341: winnt_accept: Asynchronous AcceptEx failed.

mpm_winnt runs a single child process, so ThreadsPerChild must be high enough to handle the entire load of the server. [1]

Resolution

  1. Stop the Access Gateway services.

  2. Go to the Apache conf directory (installation_home/secure-proxy/httpd/conf/) [2], open httpd-mpm.conf and increase the number of worker threads (ThreadsPerChild) [3] to a value suited to the user request load, or double the current value (for example, 150 -> 300).
    Note: ThreadsPerChild cannot exceed ThreadLimit; if it does, Apache lowers it at startup and logs a warning. [1]
  3. Start the Access Gateway services.

Additional Information

  1. mpm_common - ThreadsPerChild

  2. Configure the Apache Settings Manually

  3. Access Gateway Troubleshooting