search cancel

NCMconfigBucket files not cleared in the Spectrum reporting directory

book

Article ID: 188879

calendar_today

Updated On:

Products

CA Spectrum CA eHealth

Issue/Introduction

This article describes what to do when there is a large number of ncmconfigbucket files in the reporting directory and they are increasing in number rather than being cleared.

While the bucket tables can be cleared manually with the following mySQL command (the following using a bucket table called "ncmconfigbucket16777216_1493943512213" as an example):

$SPECROOT/mysql/bin/mysql.exe --defaults-file=../my-spectrum.cnf  -uroot -proot reporting -e"DROP TABLE IF exists ncmconfigbucket16777216_1493943512213"

This is not a reasonable solution when there are thousands of bucket tables to drop.

Environment

Release : 10.4.1

Component : Spectrum Applications

Cause

This happens very rarely and can be be due to a corrupt bucket file that cannot be dropped after processed it which blocks the deletion of subsequent buckets.  A mySQLcheck --repair used to help by removing the corruption records and allowing the processing to proceed but since changing the storage engine of the reporting db, this utility no longer works so we have to manually delete the corrupt record. Deleting the oldest records first should have the same effect and allow the system to manually drop the rest if the buckets after a tomcat restart.

 

Resolution

  1. Stop Spectrum tomcat

  2. Clean all the NCM config bucket files, by running the drop command as per the above but replacing the example bucket table name (ncmconfigbucket16777216_1493943512213) with the one to be deleted from the system.

  3. Login to MySQL on the Spectrum OneClick Server:

    $SPECROOT/mysql/bin/mysql.exe  --defaults-file=../my-spectrum.cnf  -uroot -proot reporting 

  4. Run the following mySQL query:

    update bucketactivitylog set destroy_time = now() where bucket_table_name like '%ncm%' and destroy_time is null;

  5. Restart Spectrum tomcat.