<html>
  <head>
    <meta content="text/html; charset=ISO-8859-1"
      http-equiv="Content-Type">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    Hello James<br>
    if you app works well on localnetwork, the problem come from your
    vpn  connection.<br>
    Please check MTU and fragmantion packet of your vpn ( depend of vpn
    type, ipsec, ssl , other )<br>
    see
<a class="moz-txt-link-freetext" href="http://codeidol.com/telecommunications/vpn/Scaling-and-Optimizing-IPsec-VPNs/MTU-and-Fragmentation-Considerations-in-an-IPsec-VPN/">http://codeidol.com/telecommunications/vpn/Scaling-and-Optimizing-IPsec-VPNs/MTU-and-Fragmentation-Considerations-in-an-IPsec-VPN/</a><br>
    bye<br>
    Hugues.<br>
    <br>
    <br>
    <div class="moz-cite-prefix">Le 21/04/2014 18:55, James Baer a
      écrit :<br>
    </div>
    <blockquote
cite="mid:CAE_gaBsjAONuV3WEkYC5cu+hhP863m2ysU+K21vN3GGmqwKo+g@mail.gmail.com"
      type="cite">
      <div dir="ltr">
        <div>
          <div>
            <div>
              <div>
                <div>Hello - I'm having an issue with
                  Dancer::Plugin::Database that has been hard to
                  reproduce and track down.<br>
                  <br>
                </div>
                I have a new app that I just moved to its production
                environment. It connects to a database that is in a
                remote data center over a vpn tunnel. Everything
                functions normally as expected 98% of the time, however
                occasionally I will hit a worker thread (deployed via
                Starman) that just hangs trying to get a database
                handle. It hangs in the _check_connection subroutine
                until it reaches some timeout. Then will reconnect just
                fine with a new connection.<br>
                <br>
                I'm using plugin version 1.82 and I have traced it down
                to this line in the plugin:<br>
                if ($dbh->{Active} && (my $result =
                $dbh->ping)) {<br>
                <br>
                Right at this if statement is where it hangs, i assume
                while calling the ping function. It seems there is some
                confusion as to whether the dbh is still active, it then
                calls ping which hangs for a number of minutes (not sure
                how many exactly yet, b/t 3-5). This renders this worker
                thread unresponsive until it times out. It will
                eventuall fall into the else block and just return
                false, which then a new connection is established just
                fine. <br>
              </div>
            </div>
            <div><br>
            </div>
            I have successfully deployed a number of apps using this
            same plugin with no problems this only difference here is
            the physical location so there maybe something network
            related, just not sure where.<br>
            <br>
          </div>
          <div>I have dug into DBI, etc and the ping functions works
            fine on all my test scripts. Again, this only happens once
            in a while so I cannot reproduce on command, which makes it
            difficult to debug.<br>
            <br>
            <br>
          </div>
          <div>Here is the output of my debug statements, showing the
            one thread that hangs:<br>
            <br>
            [27037] debug @0.005053> [hit #4]Database
            connection_check_threshold [30] in
            /usr/local/share/perl5/Dancer/Plugin/Database.pm l. 69<br>
            [27037] debug @0.005189> [hit #4]Database handle last
            check [1398093938] in
            /usr/local/share/perl5/Dancer/Plugin/Database.pm l. 70<br>
            [27037] debug @0.005345> [hit #4]Database calling
            check_connection in
            /usr/local/share/perl5/Dancer/Plugin/Database.pm l. 83<br>
            [27037] debug @0.005481> [hit #4]Database.pm in
            check_connection before if active and ping in
            /usr/local/share/perl5/Dancer/Plugin/Database.pm l. 265<br>
            ... other threads working ...<br>
            [27037] debug @962.134467> [hit #4]Database in
            check_connectiion false return  in
            /usr/local/share/perl5/Dancer/Plugin/Database.pm l. 285<br>
            [27037] debug @962.134667> [hit #4]Database connection
            went away, reconnecting in
            /usr/local/share/perl5/Dancer/Plugin/Database.pm l. 90<br>
            [27037] debug @962.134894> [hit #4]Database calling
            get_connection in
            /usr/local/share/perl5/Dancer/Plugin/Database.pm l. 97<br>
            [27037] debug @962.135059> [hit #4]Adding
            mysql_enable_utf8 to DBI connection params to enable UTF-8
            support in /usr/local/share/perl5/Dance<br>
          </div>
          <div><br>
            <br>
            <br>
          </div>
          Any help or suggestions on where to look next is appreciated.<br>
          <br>
        </div>
        Thank you.<br>
        <div>
          <div>
            <div>
              <div>
                <div><br>
                  <br>
                </div>
              </div>
            </div>
          </div>
        </div>
      </div>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <br>
      <pre wrap="">_______________________________________________
dancer-users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:dancer-users@dancer.pm">dancer-users@dancer.pm</a>
<a class="moz-txt-link-freetext" href="http://lists.preshweb.co.uk/mailman/listinfo/dancer-users">http://lists.preshweb.co.uk/mailman/listinfo/dancer-users</a>
</pre>
    </blockquote>
    <br>
  </body>
</html>