-
Bug
-
Resolution: Done
-
Medium
-
London Release
-
None
The DB sometimes reports being out of shared memory. This is a FATAL database error that will cause REST requests to fail. It can be seen after registering 20,000 CM handles in NCMP. This error is caused by temp tables existing for the duration of the session, by default. The behavior can be changed to drop the tables when the transaction finishes.
Excerpt from postgres log:
[176] FATAL: out of shared memory [176] HINT: You might need to increase max_locks_per_transaction. [72] FATAL: out of shared memory [72] HINT: You might need to increase max_locks_per_transaction.
After waiting a few minutes, the DB auto-vacuum process will run, which frees temp tables:
[262] LOG: autovacuum: dropping orphan temp table "cpsdb.pg_temp_12.xpathtemporarytablec58fa2bb6b6e4df781ef281fbbc1d3e0" [262] LOG: autovacuum: dropping orphan temp table "cpsdb.pg_temp_12.modulereferencestochecktemp62679735ec194c458a4eef319639e589"
(A complete log shows hundreds of open temp tables after registering 20k CM handles.)