Sponsor: VoiceMeUp - Corporate & Wholesale VoIP Services

VoIP Mailing List Archives
Mailing list archives for the VoIP community
 SearchSearch 

[asterisk-users] Asterisk Realtime unixODBC timeout?


 
Post new topic   Reply to topic    VoIP Mailing List Archives Forum Index -> Asterisk Users
View previous topic :: View next topic  
Author Message
tilghman at mail.jeffa...
Guest





PostPosted: Fri Jan 11, 2008 7:39 pm    Post subject: [asterisk-users] Asterisk Realtime unixODBC timeout? Reply with quote

On Thursday 10 January 2008 16:52:11 Norman Franke wrote:
Quote:
How does one get asterisk to timeout realtime request via res_odbc to
unixODBC? I've set timeouts as appropriate for freetds (which
unixODBC is using.) However, it doesn't seem to work. It takes over 3
minutes to timeout a connection and queries never seem to timeout, so
a channel waiting on a query never terminates.

I did notice that res_odbc.c never sets a timeout on the query using
something like this:

SQLSetStmtAttr( hstmt, SQL_ATTR_QUERY_TIMEOUT, (SQLPOINTER)10, 0 );

Has anyone tested this? Is it just failing for FreeTDS connections?
(I don't have anything else.)

I'm hesitant to implement a timeout like this without making the value
settable by the user in some way, and there isn't a good way to do that
from the res_odbc level (especially since some queries, especially from
func_odbc, could take a good period of time). The right place to set
statement attributes like this would be in the prepare callback, which is
a little better, because the timeout can be adapted to the particular
query which is being executed (shorter for realtime, longer for custom
queries).

--
Tilghman
Back to top
Display posts from previous:   
Post new topic   Reply to topic    VoIP Mailing List Archives Forum Index -> Asterisk Users All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group

VoiceMeUp - Corporate & Wholesale VoIP Services