search cancel

PID Cache error, File exists (17) and IPC Error in Apache Web Agent

book

Article ID: 50269

calendar_today

Updated On:

Products

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

Issue/Introduction

 

When running a Web Agent, and in the Web Server's log, this kind of error appears in the Apache error log:

  [14/Apr/2011:14:47:06] [Error] [CA WebAgent IPC]
  [10054][CSmSharedSegment::smalloc] Error allocating shared memory segment using key 0x6cc7b0a7 - File exists (17)

  [14/Apr/2011:14:47:06] [Info] [CA WebAgent IPC] [10054]
  [CSmSem::SemRm] Removed semaphore 45285378

  [14/Apr/2011:14:47:06] [Error] SiteMinder Agent

  PID Cache error.

  Failed to initialize PID Cache

 

Cause

 

The following startup error messages:

   "PID Cache error"

is generated when Web Agent or LLAWP process is unable to create or attached to its required semaphores and shared memory segments. These are system resources required by the web agent to communicate between itself and LLAWP process to pass information.

  "Error allocating shared memory segment using key"

is a failure of this type can be created by the failure to create the segments or the segments being subsequently removed. As this is a startup issue it points to there being an issue with the creation and the most likely reasons for this are:

  • Unavailable system resources (the system settings are too low);
  • Permission issues (old resources are left around with different permissions or another web agent created the system resources with the same key);

Resolution

 

To resolve the issue, try the following:

- Verify that shared memory and semaphores leftover from the web server that would be interfering:

  • Shut down the Web Server;
  • Make sure the LLAWP process is shut down;
  • Check for shared memory and semaphores leftover from the Web Server using these commands:
       
        - ipcs -s : list semaphores
        - ipcs -m : list shared memory
        - ipcrm -s : remove semaphores
        - ipcrm -m : remove shared memory

  • Then remove any shared memory or semaphores for this instance. Look in the Web Server error log for the semaphore and shared memory keys. Those are the ones that need to be removed;      
  • Start the Web Server;
  • Check if the system has enough memory to handle the resource and session caches;
  • If the session/resource cache size has been increased, then change them to default;
  • If using the default values, then decrease to 0;
  • Then restart the Web Server;

Session and resource cache size parameters are:

  MaxSessionCacheSize
  MaxResourceCacheSize

The idea behind decreasing those values to 0 is to check whether the system has enough memory or not. There might be a loss of performance while those values are at 0 because there will be no caching. However, if this issue disappears, then it means that some memory should be added to the system, or reduced the cache size to a lower level if adding memory isn't possible.