[asterisk-bugs] [Asterisk 0015864]: idle odbc connections are not cleaned up

Asterisk Bug Tracker noreply at bugs.digium.com
Thu Sep 10 16:55:52 CDT 2009


A NOTE has been added to this issue. 
====================================================================== 
https://issues.asterisk.org/view.php?id=15864 
====================================================================== 
Reported By:                kobaz
Assigned To:                tilghman
====================================================================== 
Project:                    Asterisk
Issue ID:                   15864
Category:                   Resources/res_odbc
Reproducibility:            always
Severity:                   minor
Priority:                   normal
Status:                     feedback
Asterisk Version:           1.6.0.14 
Regression:                 No 
SVN Branch (only for SVN checkouts, not tarball releases): N/A 
SVN Revision (number only!):  
Request Review:              
====================================================================== 
Date Submitted:             2009-09-09 09:49 CDT
Last Modified:              2009-09-10 16:55 CDT
====================================================================== 
Summary:                    idle odbc connections are not cleaned up
Description: 
When using queries defined in func_odbc, asterisk will periodically
'forget' about connections it's already made, and will think it's
disconnected with the database.

The query will fail for some reason, even though a connection is already
present.  A new connection will be made.  The old connection is not cleaned
up.  And after a while the max connection limit on the server is hit and
asterisk can't make any more odbc connections.

I'm not sure if this is a problem with the unixodbc driver, or with
asterisk.  My short term fix is a script that runs around killing old idle
postgres connections from asterisk.
====================================================================== 

---------------------------------------------------------------------- 
 (0110542) kobaz (reporter) - 2009-09-10 16:55
 https://issues.asterisk.org/view.php?id=15864#c110542 
---------------------------------------------------------------------- 
[Sep 10 17:01:06] VERBOSE[12259] logger.c:     -- Executing
[s at macro-pickup:1] Set("DAHDI/26-1",
"ODBC_CALLS_CalleePickup(159788,"DAHDI/26-1",1252616458.32424)=1") in new
stack
[Sep 10 17:01:06] NOTICE[12259] res_odbc.c: Re-connecting pbx
[Sep 10 17:01:06] WARNING[12259] res_odbc.c: res_odbc: Error SQLConnect=-2
errno=136042096 \201\266^K^C\304\267\364\277\325\267
[Sep 10 17:01:06] WARNING[12259] func_odbc.c: SQL Alloc Handle failed!
[Sep 10 17:01:06] WARNING[12259] res_odbc.c: SQL Exec Direct failed. 
Attempting a reconnect...
[Sep 10 17:01:06] WARNING[12259] res_odbc.c: Unable to deallocate database
handle? 0 errno=-1233010716 \276\267(\277\201\266^A
[Sep 10 17:01:06] NOTICE[12259] res_odbc.c: Connecting pbx
[Sep 10 17:01:06] NOTICE[12259] res_odbc.c: res_odbc: Connected to pbx
[pbx] 

Issue History 
Date Modified    Username       Field                    Change               
====================================================================== 
2009-09-10 16:55 kobaz          Note Added: 0110542                          
======================================================================




More information about the asterisk-bugs mailing list