[asterisk-bugs] [Asterisk 0016146]: Need a CLI command to force a reconnect of ODBC connections

Asterisk Bug Tracker noreply at bugs.digium.com
Wed Oct 28 13:59:13 CDT 2009


The following issue has been SUBMITTED. 
====================================================================== 
https://issues.asterisk.org/view.php?id=16146 
====================================================================== 
Reported By:                btrain1227
Assigned To:                tilghman
====================================================================== 
Project:                    Asterisk
Issue ID:                   16146
Category:                   Resources/res_odbc
Reproducibility:            random
Severity:                   feature
Priority:                   normal
Status:                     assigned
Asterisk Version:           1.4.26.1 
JIRA:                        
Regression:                 No 
Reviewboard Link:            
SVN Branch (only for SVN checkouts, not tarball releases): N/A 
SVN Revision (number only!):  
Request Review:              
====================================================================== 
Date Submitted:             2009-10-28 13:59 CDT
Last Modified:              2009-10-28 13:59 CDT
====================================================================== 
Summary:                    Need a CLI command to force a reconnect of ODBC
connections
Description: 
We have a sqlite db file that is updated by the following method:

1. A new file is pushed to the server.
2. This file is 'cp -f' to the name of the production db file.
3. A reload is issued through the cli.

Not the cleanest update, but 99% of the time it works.  Sometimes though
the lookups still return data from the db file that was overwritten. 
Subsequent reloads do not reconnect to the new db file.  The only solution
is to restart asterisk. A cli command to force a reconnect of the ODBC
resources would prevent the need for a full restart.

The res_odbc.conf option 'idlecheck' will correct the issue on newer
installs.  When the timeout is reached the connection to the new data file
is made.  On a busy server this requires setting it to a few seconds
though.

SQLite ODBC Driver http://www.ch-werner.de/sqliteodbc/

res_odbc.conf

[sqlitedb]
enabled => yes
dsn => sqlitedb
username => myuser
password => mypass
pre-connect => yes

func_odbc.conf - All simple selects.

====================================================================== 

Issue History 
Date Modified    Username       Field                    Change               
====================================================================== 
2009-10-28 13:59 btrain1227     New Issue                                    
2009-10-28 13:59 btrain1227     Status                   new => assigned     
2009-10-28 13:59 btrain1227     Assigned To               => tilghman        
2009-10-28 13:59 btrain1227     Asterisk Version          => 1.4.26.1        
2009-10-28 13:59 btrain1227     Regression                => No              
2009-10-28 13:59 btrain1227     SVN Branch (only for SVN checkouts, not tarball
releases) => N/A             
======================================================================




More information about the asterisk-bugs mailing list