<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<!--[if !mso]><style>v\:* {behavior:url(#default#VML);}
o\:* {behavior:url(#default#VML);}
w\:* {behavior:url(#default#VML);}
.shape {behavior:url(#default#VML);}
</style><![endif]--><style><!--
/* Font Definitions */
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:Candara;
        panose-1:2 14 5 2 3 3 3 2 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri","sans-serif";
        mso-fareast-language:EN-US;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:#0563C1;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:#954F72;
        text-decoration:underline;}
span.EmailStyle17
        {mso-style-type:personal-compose;
        font-family:"Calibri","sans-serif";
        color:windowtext;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-family:"Calibri","sans-serif";
        mso-fareast-language:EN-US;}
@page WordSection1
        {size:612.0pt 792.0pt;
        margin:72.0pt 72.0pt 72.0pt 72.0pt;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="EN-GB" link="#0563C1" vlink="#954F72">
<div class="WordSection1">
<p class="MsoNormal">Hi,<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">I’m currently wracking my brains trying to deduce where an application hang can be coming from.<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">I have ported the PostGres schema to be compatible with MS Sql Server and have had no issues getting a working dev environment working.  However when I try and use SQL Azure as the backend db as opposed to SQL Server 2012 (running locally
 on my dev machine) Kamailio will seem to hang after about 10 – 15 mins of flawless operation.  I have recreated the SQL Azure schema from the working schema running on my dev machine and copied all data in a 1:1 manner so I can be certain it’s not a data quality
 issue.  I am using the same FreeTDS/UnixODBC config that I am using for Asterisk realtime (which doesn’t exhibit this behaviour).  The really strange thing is that I can see the queries being sent by Kmailio in the freetds trace log, and the response from
 SQL Azure, however its as if the db response handler is deadlocked/hung.  The kamailio process continues to work fine, and as long as its not required to commiunicate with the DB all appears well i.e. no error messages in the log file.<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">This behaviour only happens when im using SQL Azure as opposed to SQL Server, so there must be something causing the issue, that’s unique to SQL azure as opposed to SQL Server.  As far as I can tell this is not something I can create a
 backtrace for as no core dumps are produced, as far as I can tell there is no easy way debug what the lock is.  If anyone has any suggestions I would be very grateful to hear them.<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">One thing that occurs to me is that the db_unixodbc module doesn’t have half as many parameters as its equilent in Asterisk, and that connection pooling may be in use, this could be a bit of a show stopper AFAIK you have to disable connection
 pooling with SQL server, certainly any of the guides I have come across configuring Asterisk to work with SQL server suggests that.<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><b><span style="font-size:10.5pt;font-family:"Candara","sans-serif";color:#44546A;mso-fareast-language:EN-GB">Tim Chubb<o:p></o:p></span></b></p>
<p class="MsoNormal"><span style="font-size:10.5pt;font-family:"Candara","sans-serif";color:#44546A;mso-fareast-language:EN-GB">Developer<o:p></o:p></span></p>
<p class="MsoNormal"><span style="mso-fareast-language:EN-GB"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Candara","sans-serif";color:#404040;mso-fareast-language:EN-GB"><img width="208" height="42" id="Picture_x0020_1" src="cid:image002.png@01CF90A8.9699EFD0" alt="VS-logo-email"></span><span style="mso-fareast-language:EN-GB"><o:p></o:p></span></p>
<p class="MsoNormal"><span style="mso-fareast-language:EN-GB"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.5pt;font-family:"Candara","sans-serif";color:#44546A;mso-fareast-language:EN-GB">The Coach House, Heywood House, Park Lane, Heywood, Westbury, BA13 4NA<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.5pt;font-family:"Candara","sans-serif";color:#44546A;mso-fareast-language:EN-GB">               
<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.5pt;font-family:"Candara","sans-serif";color:#44546A;mso-fareast-language:EN-GB">Direct: +44 (0)333 0110164<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.5pt;font-family:"Candara","sans-serif";color:#44546A;mso-fareast-language:EN-GB">Email:
<a href="mailto:tim.chubb@voicesimplified.com"><span style="color:#0563C1">tim.chubb@voicesimplified.com</span></a><o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.5pt;font-family:"Candara","sans-serif";color:#44546A;mso-fareast-language:EN-GB">Web:
<a href="http://www.voicesimplified.com/"><span style="color:#0563C1">www.VoiceSimplified.com</span></a></span><span style="font-size:10.0pt;font-family:"Candara","sans-serif";color:#44546A;mso-fareast-language:EN-GB"><o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:6.0pt;font-family:"Candara","sans-serif";color:#44546A;mso-fareast-language:EN-GB"><o:p> </o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:8.0pt;font-family:"Candara","sans-serif";color:#44546A;mso-fareast-language:EN-GB">Voice Simplified Ltd (registered in England & Wales: 07171825) registered office: Curzon House, 2nd Floor,
 24 High Street, Banstead, Surrey. SM7 2LJ.<o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:8.0pt;font-family:"Candara","sans-serif";color:#44546A;mso-fareast-language:EN-GB">The information in this email is confidential and may be legally privileged. It is intended solely for
 the addressee. Access to this email by anyone else <o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:8.0pt;font-family:"Candara","sans-serif";color:#44546A;mso-fareast-language:EN-GB">is unauthorised. If you are not the intended recipient, any disclosure, copying, distribution or any action
 taken or omitted to be taken in reliance on it,<o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:8.0pt;font-family:"Candara","sans-serif";color:#44546A;mso-fareast-language:EN-GB">is prohibited and may be unlawful. If you are not the intended recipient, please return the message to
 the sender and delete it from your records. <o:p></o:p></span></p>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
</body>
</html>