<html>
  <head>
    <meta content="text/html; charset=ISO-8859-1"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    <div class="moz-cite-prefix">Hi All,<br>
      Last weeks with increased number of cores and limited number of
      connections to caldb we had problems with database access during
      simulation and cooking.<br>
      Marty&nbsp; Wise (dbase manager) set up the process to kill stale idle
      connections in the
      event scheduler. To run the clas software accessing the caldb
      (gsim,a1,user_ana) we have to recompile it with the <br>
      new caldb/Map available from SVN (fixed by Nathan, see below),
      otherwise you may run into problem with reconnection crashes.<br>
      Harut<br>
      <br>
      <br>
      <br>
      On 10/2/14, 9:53 AM, Nathan Baltzell wrote:<br>
    </div>
    <blockquote cite="mid:C9586BC8-607A-48E4-9FA4-F4739ABFCEE4@jlab.org"
      type="cite">
      <pre wrap="">Hi Harut,

The io/caldb/Map in SVN is ready.

I reverted my latest change to go back to one persistent connection instead of
hammering the server with many connect+disconnects.  But the bugfix on the
interpretation of mysql_ping return value will allow us to automatically reconnect
when server kills connections that have been sleeping for a long time.

-Nathan
 

</pre>
    </blockquote>
    ------- Original Message --------
    <table class="moz-email-headers-table" cellpadding="0"
      cellspacing="0" border="0">
      <tbody>
        <tr>
          <th align="RIGHT" nowrap="nowrap" valign="BASELINE">Subject: </th>
          <td>[Clas_offline] caldb timeout/reconnect bug</td>
        </tr>
        <tr>
          <th align="RIGHT" nowrap="nowrap" valign="BASELINE">Date: </th>
          <td>Thu, 11 Sep 2014 09:59:09 -0400</td>
        </tr>
        <tr>
          <th align="RIGHT" nowrap="nowrap" valign="BASELINE">From: </th>
          <td>Nathan Baltzell <a class="moz-txt-link-rfc2396E" href="mailto:baltzell@jlab.org">&lt;baltzell@jlab.org&gt;</a></td>
        </tr>
        <tr>
          <th align="RIGHT" nowrap="nowrap" valign="BASELINE">To: </th>
          <td>clas offline <a class="moz-txt-link-rfc2396E" href="mailto:clas_offline@jlab.org">&lt;clas_offline@jlab.org&gt;</a></td>
        </tr>
      </tbody>
    </table>
    <br>
    <br>
    <pre>FYI Everyone,

After changes in JLab firewalls on August 16, at least a couple run groups (eg6 and eg4)
started getting new segfaults related to timeout errors in connections to the calibration
database during cooking.  While CLAS already had a mechanism in place to automatically
reconnect in such cases, it had a bug resulting in false success that led to the recent
problems.  

Correctly testing the return value from mysql_ping fixes it, and it&#8217;s now in svn&#8217;s
trunk/io/caldb/Map/calib_connect.c (line 122), as well as cvs&#8217;s 
packages/caldb/Map/calib_connect.c (line 113) just in case.  


This bug only (?) became relevant after a new 30 minute timeout on dormant connections
implemented in the JLab firewall on 8/16.  Maybe there will be related issues.

Regards,
Nathan


_______________________________________________
Clas_offline mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Clas_offline@jlab.org">Clas_offline@jlab.org</a>
<a class="moz-txt-link-freetext" href="https://mailman.jlab.org/mailman/listinfo/clas_offline">https://mailman.jlab.org/mailman/listinfo/clas_offline</a>
</pre>
  </body>
</html>