[asterisk-bugs] [JIRA] (ASTERISK-22708) res_odbc.conf negative_connection_cache option not respected

JoshE (JIRA) noreply at issues.asterisk.org
Fri Nov 15 08:38:03 CST 2013


    [ https://issues.asterisk.org/jira/browse/ASTERISK-22708?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=211862#comment-211862 ] 

JoshE commented on ASTERISK-22708:
----------------------------------

Rusty- there are a couple areas where this is affected - func_odbc and also realtime peers.  It basically all goes haywire when you force this situation.

In an ideal world, the extconfig that lets you do:

sippeers => odbc,config_1,sippeers,1
sippeers => odbc,config_2,sippeers,2

We have the same thing set up for func_odbc, where we have these DSNs ordered:

[GEN_HINT]
dsn=config_1,config_2

In practice, none of this works as expected.

                
> res_odbc.conf negative_connection_cache option not respected
> ------------------------------------------------------------
>
>                 Key: ASTERISK-22708
>                 URL: https://issues.asterisk.org/jira/browse/ASTERISK-22708
>             Project: Asterisk
>          Issue Type: Bug
>      Security Level: None
>          Components: Functions/func_odbc, Resources/res_odbc
>    Affects Versions: SVN, 11.5.1, 11.7.0
>         Environment: CentOS 6
>            Reporter: JoshE
>            Assignee: JoshE
>         Attachments: full, odbc_errors.txt
>
>
> The database failover behavior does not work as expected with MySQL / MariaDB on the databases.  Based on a reading of the documentation and source, I would expect this config in res_odbc to behave differently than it does:
> [config]
> enabled => yes
> dsn => MySQL
> username => user
> password => hidden
> pre-connect => yes
> sanitysql => select 1
> idlecheck => 30
> share_connections => yes
> connect_timeout => 2
> negative_connection_cache => 300
> [config_2]
> enabled => yes
> dsn => MySQL-2
> username => user
> password => hidden
> pre-connect => yes
> sanitysql => select 1
> idlecheck => 30
> share_connections => yes
> connect_timeout => 2
> negative_connection_cache => 300
> Based on my reading, a connect timeout getting hit should cause a negative cache where new connections are not attempted for 300 seconds.  That does not occur in practice.  The server continually attempts to reconnect to the server, meanwhile the entire system becomes totally unusable until the database connection is restored.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.asterisk.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira



More information about the asterisk-bugs mailing list