Document ID: TEC1920756
Last Modified Date: 2/13/201
- CA Application Performance Management
- CA Application Performance Management:Release:CA APM 9.7
- WILY CEM
The Postgres APM database is seeing "Out of Shared Memory Errors." What can be done about this?
Customer has a MOM and an APM Postgres Database on the same server. Shared Memory Errors appear when doing one of two things:
- Starting the EM and the APM Database is running an update query that consumes most of the EM memory. The query is the following
update ts_us_sessions_map set ts_soft_delete=true, ts_ageout_time='2013-01-21 17:45:00' where ts_soft_delete=false and ts_last_update<'2013-01-21 16:45:00' and ts_app_id=1;
However, the database table involved is empty and executing the following query returns a value of zero:
select count (*) from ts_us_sessions_map;
- Running the query directly on the APM database.
apmdes01:/opt/wily_data/data/bin> PGUSER=admin PGPASSWORD="admin" psql -q -d cemdb cemdb=> update ts_us_sessions_map set ts_soft_delete=true, ts_ageout_time='2015-01-21 17:45:00' where ts_soft_delete=false and ts_last_update<'2015-01-21 16:45:00' and ts_app_id=1; WARNING: out of shared memory ERROR: out of shared memory HINT: You might need to increase max_locks_per_transaction. cemdb-> \q
Here are some things to investigate should this issue occurs
- Increase max_locks_per_transaction to at least 200.
- If on a UNIX system, run the ipcs command to check the Postgres shared memory. A link is below.
- Increase the APM pool connections (c3p0) as needed
- See if Session information is needed for the first place. Session map tables can get very large.
- See the APM Database Maintenance Tech Note for more info.
- Following the best practice of placing the APM database on its own server to eliminate memory and connection contention.
- Make sure there is enough memory on the system.
- Increasing SWAP temporarily to provide enough virtual memory for the EM to start when the RAM request is issued by the JVM to the kernel.
Also see TEC610638.