[asterisk-bugs] [JIRA] (ASTERISK-22708) res_odbc.conf negative_connection_cache option not respected, failover between DSNs doesn't work

Marian Piater (JIRA) noreply at issues.asterisk.org
Sun Mar 1 12:07:36 CST 2015


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

Marian Piater edited comment on ASTERISK-22708 at 3/1/15 12:07 PM:
-------------------------------------------------------------------

+1

Debian Wheezy, Asterisk 11.15.0, unixodbc 2.2.14p2-5, libmyodbc 5.1.10-2+deb7u1



was (Author: maikyp):
+1

Debian Wheeze, Asterisk 11.15.0, unixodbc 2.2.14p2-5, libmyodbc 5.1.10-2+deb7u1


> res_odbc.conf negative_connection_cache option not respected, failover between DSNs doesn't work
> ------------------------------------------------------------------------------------------------
>
>                 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
>         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 was sent by Atlassian JIRA
(v6.2#6252)



More information about the asterisk-bugs mailing list