For AI agents: this documentation is indexed for you in llms.txt, and all of it in /llms.txt. Every page is also available as markdown: append .md to its address.

You are reading Travelping Open Subscriber Server 6.19, an older release. The newest release is 6.20. Read this page in 6.20

Database issues

Database issues may occur during operations on the TPOSS cluster since it extensively uses MySQL. This document provides common tips for troubleshooting known issues.

MySQL 1406 error - data too long for column

Most of the table columns used by TPOSS to store string-like data are of the varchar(256)Opens in a new tab data type. If you provide too long data, the column size may not be enough. In such a case, the MySQL 1406 error occurs. To solve the issue, increase the size of a column with the following command:

sql

Repair partitions in the CDR table

TPOSS relies on a set of MySQL stored procedures to automatically manage partition rotation.

Partitions older than the period defined by cdr.controller.database.partitions_duration must be dropped, while new partitions should be created in advance so that data can continue to be written without interruption.

Under normal conditions, the database ensures that at least two partitions exist:

  • Currently active partition
  • Special partition named future, based on which new partitions are created

The process of partition rotation can be broken for various reasons. If you notice that new partitions stop being created and only a single active partition named future remains, the database will write data into this partition without any further deletion. Over time, this may lead to the database running out of disk space.

To check the current state of the CDR table partitions, run the following SQL command:

sql

Under normal conditions, the output should include multiple time-based partitions followed by the future partition, for example:

sql

If the only partition present is future (the last one in the example above), the partition layout is broken and must be repaired.

To repair partitions, follow the steps below:

  1. Switch to the TPOSS database where you have to fix the partitions:

    sql
  2. Execute the SQL commands below, replacing INTERVAL 1 day in lines 3 and 4 with the value defined by cdr.controller.database.partitions_duration:

    sql

    For example, if cdr.controller.database.partitions_duration is set to 12-hours, replace INTERVAL 1 day with INTERVAL 12 hour. For a complete list of supported interval formats, refer to the official MySQL documentation on Temporal IntervalsOpens in a new tab.

  3. Execute the SQL commands listed below one by one to create a new cdr table with partitions.

    These commands perform the next actions:

    • Create an empty copy of the existing cdr table with wrong partitions
    • Build proper partitions on this table
    • Rename the original cdr table to cdrs_wrong_partitions_backup_{UTC_DATE_TIME} and the copy to cdr

    Create a delimiter for a new procedure:

    sql

    Create a new procedure:

    sql

    Switch back to the default delimiter:

    sql

    Reorganize partitions:

    sql

After completing these steps, the new cdr table should contain exactly two partitions:

  • Currently active partition
  • The future partition

All additional partitions should be created automatically by the database within the next few minutes.

Important

You should verify within the next hour that all expected partitions have been created correctly. If partitions are still missing, manually execute:

sql

Use the time-unit and time-value from cdr.controller.database.partitions_duration. If you are not sure about the parameters, you can take them from the output of this query:

sql

If the procedure fails, submit a support ticket and include the full error output from this call and steps you executed.

You should delete the original table, named cdrs_wrong_partitions_backup_{UTC_DATE_TIME}, once its data-retention period has expired. You can do it using the next command:

sql