<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="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 11 (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:Wingdings;
        panose-1:5 0 0 0 0 0 0 0 0 0;}
@font-face
        {font-family:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman";}
a:link, span.MsoHyperlink
        {color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {color:blue;
        text-decoration:underline;}
p
        {mso-margin-top-alt:auto;
        margin-right:0in;
        mso-margin-bottom-alt:auto;
        margin-left:0in;
        font-size:12.0pt;
        font-family:"Times New Roman";}
span.EmailStyle19
        {mso-style-type:personal-reply;
        font-family:Arial;
        color:navy;}
@page Section1
        {size:8.5in 11.0in;
        margin:1.0in 1.25in 1.0in 1.25in;}
div.Section1
        {page:Section1;}
-->
</style>
</head>
<body lang=EN-US link=blue vlink=blue>
<div class=Section1>
<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'>Thanks for the suggestions. But performance
isn’t our problem; we’re operating way under capacity (we’ve
implemented almost all your suggestions anyway). Our problem was specifically
the “lockup after DB interface outage” issue.<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'><o:p> </o:p></span></font></p>
<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'>Dave<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'><o:p> </o:p></span></font></p>
<div>
<div class=MsoNormal align=center style='margin-left:.5in;text-align:center'><font
size=3 face="Times New Roman"><span style='font-size:12.0pt'>
<hr size=2 width="100%" align=center tabindex=-1>
</span></font></div>
<p class=MsoNormal style='margin-left:.5in'><b><font size=2 face=Tahoma><span
style='font-size:10.0pt;font-family:Tahoma;font-weight:bold'>From:</span></font></b><font
size=2 face=Tahoma><span style='font-size:10.0pt;font-family:Tahoma'> Nick
Rogness [mailto:nick@rogness.net] <br>
<b><span style='font-weight:bold'>Sent:</span></b> Wednesday, January 23, 2008
9:02 PM<br>
<b><span style='font-weight:bold'>To:</span></b> Dave Kitabjian<br>
<b><span style='font-weight:bold'>Cc:</span></b> Ruud Besseling;
radiator@open.com.au; Greg Evanyke<br>
<b><span style='font-weight:bold'>Subject:</span></b> Re: no timeout on
database query</span></font><o:p></o:p></p>
</div>
<p class=MsoNormal style='margin-left:.5in'><font size=3 face="Times New Roman"><span
style='font-size:12.0pt'><o:p> </o:p></span></font></p>
<p class=MsoNormal style='mso-margin-top-alt:0in;margin-right:0in;margin-bottom:
12.0pt;margin-left:.5in'><font size=3 face="Times New Roman"><span
style='font-size:12.0pt'><o:p> </o:p></span></font></p>
<div>
<p class=MsoNormal style='margin-left:.5in'><span class=gmailquote><font
size=3 face="Times New Roman"><span style='font-size:12.0pt'>On 1/23/08, <b><span
style='font-weight:bold'>Dave Kitabjian</span></b> <<a
href="mailto:dave@netcarrier.com">dave@netcarrier.com</a>> wrote:</span></font></span><o:p></o:p></p>
</div>
<blockquote style='border:none;border-left:solid #CCCCCC 1.0pt;padding:0in 0in 0in 6.0pt;
margin-left:4.8pt;margin-right:0in'>
<div vlink=blue link=blue>
<div>
<p style='margin-left:.5in'><font size=2 color=navy face=Arial><span
style='font-size:10.0pt;font-family:Arial;color:navy'>Thanks for sharing, as
this has haunted us for some time as well. It's helpful to hear your analysis
of the cause. We were forced to relax concurrency enforcement (Simultaneous
Use, via MySQL) because a situation like this knocked both our primary and
secondary servers completely offline </span></font><font size=2 color=navy
face=Wingdings><span style='font-size:10.0pt;font-family:Wingdings;color:navy'>L</span></font><o:p></o:p></p>
</div>
</div>
</blockquote>
<div>
<p class=MsoNormal style='margin-left:.5in'><font size=3 face="Times New Roman"><span
style='font-size:12.0pt'> <o:p></o:p></span></font></p>
</div>
<div>
<p class=MsoNormal style='margin-left:.5in'><font size=3 face="Times New Roman"><span
style='font-size:12.0pt'> A few things to consider implementing if you
are handling lots-o-requests that have helped us out over the years running
Radiator and MySQL:<o:p></o:p></span></font></p>
</div>
<div>
<p class=MsoNormal style='margin-left:.5in'><font size=3 face="Times New Roman"><span
style='font-size:12.0pt'> <o:p></o:p></span></font></p>
</div>
<div>
<p class=MsoNormal style='margin-left:.5in'><font size=3 face="Times New Roman"><span
style='font-size:12.0pt'> 1) Split Authentication and Accounting into 2
different Unix processes.<o:p></o:p></span></font></p>
</div>
<div>
<p class=MsoNormal style='margin-left:.5in'><font size=3 face="Times New Roman"><span
style='font-size:12.0pt'> 2) Use InnoDB for Accounting records,
row-level-locking has made a huge difference<o:p></o:p></span></font></p>
</div>
<div>
<p class=MsoNormal style='margin-left:.5in'><font size=3 face="Times New Roman"><span
style='font-size:12.0pt'> 3) Use local replication slaves whenever
you need to read something out of MySQL<o:p></o:p></span></font></p>
</div>
<div>
<p class=MsoNormal style='margin-left:.5in'><font size=3 face="Times New Roman"><span
style='font-size:12.0pt'> 4) Use LDAP instead of MySQL for Authentication
if at all possible<o:p></o:p></span></font></p>
</div>
<div>
<p class=MsoNormal style='margin-left:.5in'><font size=3 face="Times New Roman"><span
style='font-size:12.0pt'> <o:p></o:p></span></font></p>
</div>
<div>
<p class=MsoNormal style='margin-left:.5in'><font size=3 face="Times New Roman"><span
style='font-size:12.0pt'>Making these changes have increased performance 10
fold or so. You should be able to do 20-30 radius requests per second
without much effort. If you can't, then something is slow.<o:p></o:p></span></font></p>
</div>
<div>
<p class=MsoNormal style='margin-left:.5in'><font size=3 face="Times New Roman"><span
style='font-size:12.0pt'> <o:p></o:p></span></font></p>
</div>
<p style='margin-left:.5in'><font size=2 color=navy face=Arial><span
style='font-size:10.0pt;font-family:Arial;color:navy'>Dave</span></font><o:p></o:p></p>
<blockquote style='border:none;border-left:solid #CCCCCC 1.0pt;padding:0in 0in 0in 6.0pt;
margin-left:4.8pt;margin-right:0in'>
<div vlink=blue link=blue>
<div>
<p style='margin-left:.5in'><font size=2 color=navy face=Arial><span
style='font-size:10.0pt;font-family:Arial;color:navy'> </span></font><o:p></o:p></p>
<div>
<div style='margin-left:.5in'>
<div class=MsoNormal align=center style='margin-left:.5in;text-align:center'><font
size=3 face="Times New Roman"><span style='font-size:12.0pt'>
<hr size=2 width="100%" align=center>
</span></font></div>
</div>
<p style='margin-left:1.0in'><b><font size=2 face=Tahoma><span
style='font-size:10.0pt;font-family:Tahoma;font-weight:bold'>From:</span></font></b><font
size=2 face=Tahoma><span style='font-size:10.0pt;font-family:Tahoma'> <a
href="mailto:owner-radiator@open.com.au" target="_blank">owner-radiator@open.com.au</a>
[mailto:<a href="mailto:owner-radiator@open.com.au" target="_blank">
owner-radiator@open.com.au</a>] <b><span style='font-weight:bold'>On Behalf Of </span></b>Nick
Rogness<br>
<b><span style='font-weight:bold'>Sent:</span></b> Tuesday, January 22, 2008
12:18 PM<br>
<b><span style='font-weight:bold'>To:</span></b> Ruud Besseling<br>
<b><span style='font-weight:bold'>Cc:</span></b> <a
href="mailto:radiator@open.com.au" target="_blank">radiator@open.com.au</a><br>
<b><span style='font-weight:bold'>Subject:</span></b> Re: (RADIATOR) no timeout
on database query</span></font><o:p></o:p></p>
</div>
<p style='margin-left:1.0in'><font size=3 face="Times New Roman"><span
style='font-size:12.0pt'> <o:p></o:p></span></font></p>
<p style='mso-margin-top-alt:5.0pt;margin-right:0in;margin-bottom:12.0pt;
margin-left:1.0in'><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'> <o:p></o:p></span></font></p>
<div>
<p style='margin-left:1.0in'><font size=3 face="Times New Roman"><span
style='font-size:12.0pt'>On 1/21/08, <b><span style='font-weight:bold'>Ruud
Besseling</span></b> <<a href="mailto:ruudb@kpn.net" target="_blank">
ruudb@kpn.net</a>> wrote: <o:p></o:p></span></font></p>
<p style='margin-left:1.0in'><font size=3 face="Times New Roman"><span
style='font-size:12.0pt'>Hello,<br>
<br>
We use a mysql database to save all accounting data. Normally when the<br>
database is not available the insert query <br>
times out, the data is saved in a local file and radiator is ready for<br>
the next request.<br>
<br>
However, when the network interface of the database server is going down<br>
unexpectedly, the timeout does not occur<br>
and radiator hangs.<br>
<br>
Has anyone experienced the same problems and -more important- does<br>
anyone have a solution?<br>
<br>
<br>
We are using Radiator 3.13, MySQL 5.0.41, DBI 1.6 and DBD 4.005<br>
We use several servers and on each server there are several accounting <br>
radius processes running.<o:p></o:p></span></font></p>
<div>
<p style='margin-left:1.0in'><font size=3 face="Times New Roman"><span
style='font-size:12.0pt'> <o:p></o:p></span></font></p>
</div>
<div>
<p style='margin-left:1.0in'><font size=3 face="Times New Roman"><span
style='font-size:12.0pt'>[snip]<o:p></o:p></span></font></p>
</div>
<div>
<p style='margin-left:1.0in'><font size=3 face="Times New Roman"><span
style='font-size:12.0pt'> <o:p></o:p></span></font></p>
</div>
<div>
<p style='margin-left:1.0in'><font size=3 face="Times New Roman"><span
style='font-size:12.0pt'>I have experienced this same problem for years with
Radiator including and upto 3.13 with Mysql5.0 and MySQL5.1. If the
database server goes away or takes time to complete in the middle of a SQL
execution statement, the server hangs (blocks) and the socket queue fills
up. My advise to you is, don't let it happen. A significant amount
of tuning needs to be done if you are dealing with a lot of Radius requests. <o:p></o:p></span></font></p>
</div>
<div>
<p style='margin-left:1.0in'><font size=3 face="Times New Roman"><span
style='font-size:12.0pt'> <o:p></o:p></span></font></p>
</div>
<div>
<p style='margin-left:1.0in'><font size=3 face="Times New Roman"><span
style='font-size:12.0pt'>I do not know how much Hugh and crew can do to help
you out as I think it is probably a limitation of Perl DBI/DBD. <o:p></o:p></span></font></p>
</div>
<div>
<p style='margin-left:1.0in'><font size=3 face="Times New Roman"><span
style='font-size:12.0pt'> <o:p></o:p></span></font></p>
</div>
<div>
<p style='margin-left:1.0in'><font size=3 face="Times New Roman"><span
style='font-size:12.0pt'>Haven't tried this in v4.0 yet.<o:p></o:p></span></font></p>
</div>
<div>
<p style='margin-left:1.0in'><font size=3 face="Times New Roman"><span
style='font-size:12.0pt'> <o:p></o:p></span></font></p>
</div>
<div>
<p style='margin-left:1.0in'><font size=3 face="Times New Roman"><span
style='font-size:12.0pt'> <o:p></o:p></span></font></p>
</div>
</div>
</div>
</div>
</blockquote>
<p class=MsoNormal style='margin-left:.5in'><font size=3 face="Times New Roman"><span
style='font-size:12.0pt'><o:p> </o:p></span></font></p>
</div>
</body>
</html>