Skip to main content
Skip table of contents

Slow query logging for debugging of mysql configuration issues

Problem

flex.bi server gets very slow response times from import or report queries. Sometimes this causes a report execution timeouts, sometimes error messages about not being able to lock records or other database related messages in queues log file.

Solution

  1. Enabling logging of slow queries might help to trace the cause of the problem if it is database configuration problem. Enter these commands in you mysql configuration (usually /etc/my.cnf file):

    CODE
    long_query_time                = 10
    slow_query_log                 = 1
    slow_query_log_file            = /var/log/mysql/log-slow-queries.log
  2. Create the file /var/log/messages.log-slow-queries.log and make sure it can be accessed by the system user running mysql - usually user mysql.
    For example:

    CODE
    mkdir /var/log/mysql
    touch /var/log/mysql/log-slow-queries.log
    chown mysql:mysql /var/log/mysql/log-slow-queries.log
  3. Then restart mysql service and monitor the file.

    CODE
    systemctl restart mysqld
JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.