Skip to content
Snippets Groups Projects
  • Joshua Colp's avatar
    54a912b2
    res_odbc: Add basic query logging. · 54a912b2
    Joshua Colp authored
    When Asterisk is connected and used with a database the response
    time of the database can cause problems in Asterisk if it is long.
    Normally the only way to see this problem would be to retrieve a
    backtrace from Asterisk and examine where things are blocked, or
    examine the database to see if there is any indication of a
    problem.
    
    This change adds some basic query logging to make it easier to
    investigate such a problem. When logging is enabled res_odbc will
    now keep track of the number of queries executed, as well as the
    query that has taken the longest time to execute. There is also
    an option which will cause a WARNING message to be output if a
    query takes longer than a configurable amount of time to execute.
    
    This makes it easier and clearer for users that their database may
    be experiencing a problem that could impact Asterisk.
    
    ASTERISK-28277
    
    Change-Id: I173cf4928b10754478a6a8c27dfa96ede0f058a6
    54a912b2
    History
    res_odbc: Add basic query logging.
    Joshua Colp authored
    When Asterisk is connected and used with a database the response
    time of the database can cause problems in Asterisk if it is long.
    Normally the only way to see this problem would be to retrieve a
    backtrace from Asterisk and examine where things are blocked, or
    examine the database to see if there is any indication of a
    problem.
    
    This change adds some basic query logging to make it easier to
    investigate such a problem. When logging is enabled res_odbc will
    now keep track of the number of queries executed, as well as the
    query that has taken the longest time to execute. There is also
    an option which will cause a WARNING message to be output if a
    query takes longer than a configurable amount of time to execute.
    
    This makes it easier and clearer for users that their database may
    be experiencing a problem that could impact Asterisk.
    
    ASTERISK-28277
    
    Change-Id: I173cf4928b10754478a6a8c27dfa96ede0f058a6