mysqld spikes CPU when starting iSymphony V3

Version 25.1 by michaely on 2014/07/21 19:37
Warning
For security reasons, the document is displayed in restricted mode as it is not the current version. There may be differences and errors due to this.

On this page

Symptoms

When starting the iSymphony V3 server you see that the process mysqld spikes in CPU usage for long periods of time.

Cause

iSymphony relies on CDR (Call Detail Record) entries to query information about call recordings in your system due to the fact that not all metadata about a recording can be placed in the recording file name for iSymphony to parse out. If you have a very large amount of CDR entries in your database these queries can take a very long time and one query needs to be made for each recording in your system.

Resolution

In order to speed up these queries you will need to index the uniqueid column in the Asterisk CDR database table. The steps to index the uniqueid column will vary based on the Asterisk configuration.

 

Below is an example on how to index the unique id column in a FreePBX based system utilizing a mysql database:

  1. Run the following command to get the database username and password. They will be labeled "AMPDBUSER" and "AMPDBPASS".

    cat /etc/freepbx.conf
  2. Next run the following command to log into the mysql database:

    mysql -u <database username> -p
  3. Enter the database password when prompted.
  4. Once you are in the mysql command line run the following command to switch to the CDR database:

    use asteriskcdrdb;
  5. Run the following command to create the index:

    ALTER TABLE `cdr` ADD INDEX `uniqueid` (`uniqueid`);
  6. Run the following command to verify the index was created:

    SHOW INDEX FROM cdr;
  7. Type the following command to exit the mysql command line:

    \quit

Related Content

Expand to see related content

Unknown macro: unmigrated-inline-wiki-markup. Click on this message for details.