OBM 2020.05 RTSM Database keep increasing

  • KM03806288
  • 20-Apr-2021
  • 22-Apr-2021

Summary

RTSM database was getting increased and content_pack table was consuming all of the size.

Error

 RTSM database which is one of the schema of the OBM,  size was growing.

The most of the schema size was occupied by the content_packs table.

The import of the CP was failing.
 
at java.util.TimerThread.run(Timer.java:505) ~[?:1.8.0_242]
Caused by: com.mercury.topaz.cmdb.server.manage.dal.CmdbDalException: Can't execute prepared statement [INSERT INTO CONTENT_PACKS (VERSION,CP_BYTES) values (?,?); Values: '2019.11.107',java.io.FileInputStream@444effd6], due to exception: org.postgresql.util.PSQLException: ERROR: canceling statement due to statement timeout at com.mercury.topaz.cmdb.server.manage.dal.CmdbDalPreparedStatementImpl.executeUpdate(CmdbDalPreparedStatementImpl.java:393) ~[cmdb-framework.jar:11.6.0.195]
at com.hp.ucmdb.cp.dal.CmdbDalAddCPCommand.writeRow(CmdbDalAddCPCommand.java:129) ~[common.jar:11.6.0.195]
at com.hp.ucmdb.cp.dal.CmdbDalAddCPCommand.writeCP(CmdbDalAddCPCommand.java:74) ~[common.jar:11.6.0.195]
... 15 more
Caused by: org.postgresql.util.PSQLException: ERROR: canceling statement due to statement timeout

Cause

The cause for the database size increase is content_packs table. The content_packs table contains the content_pack .

The content pack was not able to insert into this table and it was timing out. Because of this every time it starts to insert into this table and used to fail.

This was causing the content_packs table to increase as every failure used to insert some data.

Fix

We increased the timeout value for statement in the postgress database.

Login to RTSM database instance

psql -u <RTSM instance>

set statement_timeout to 60000;

commit;