<?xml version="1.0" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "http://bugzilla.globus.org/bugzilla/bugzilla.dtd">

<bugzilla version="3.2.3"
          urlbase="http://bugzilla.globus.org/bugzilla/"
          maintainer="bacon@mcs.anl.gov"
>

    <bug>
          <bug_id>5777</bug_id>
          
          <creation_ts>2008-01-11 14:13</creation_ts>
          <short_desc>GRAM2 audting: database connection times out</short_desc>
          <delta_ts>2009-03-19 09:48:31</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>GRAM</product>
          <component>general</component>
          <version>4.0.5</version>
          <rep_platform>Open Science Grid (OSG)</rep_platform>
          <op_sys>Linux</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>DUPLICATE</resolution>
          <dup_id>6400</dup_id>
          
          
          
          <priority>P3</priority>
          <bug_severity>blocker</bug_severity>
          <target_milestone>4.0.7</target_milestone>
          
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="John Weigand">weigand@fnal.gov</reporter>
          <assigned_to name="Stuart Martin">smartin@mcs.anl.gov</assigned_to>
          <cc>fbreitling@aip.de</cc>
    
    <cc>feller@mcs.anl.gov</cc>
    
    <cc>garzogli@fnal.gov</cc>
    
    <cc>greenc@fnal.gov</cc>
    
    <cc>madduri@mcs.anl.gov</cc>
    
    <cc>pcanal@fnal.gov</cc>
    
    <cc>roy@cs.wisc.edu</cc>
    
    <cc>smartin@mcs.anl.gov</cc>

      

      
          <long_desc isprivate="0">
            <who name="John Weigand">weigand@fnal.gov</who>
            <bug_when>2008-01-11 14:13:58</bug_when>
            <thetext>Database: MySql 4.1.22

In GRAM4, after a period of inactivity (i.e., no service/job requests), it
appears the database connection times out.  I have not pinned down the
exact length of time before the connection is lost. In this one instance, it
was from 16:00 one afternoon to 08:00 the next morning.

The GRAM auditing was working at 16:00.

At 08:00 I submitted the following job:
  globusrun-ws -submit -F gratiax31.fnal.gov:9443 -Ft Condor -c /usr/bin/whoami

The job ran successfully.
The log messages with &apos;org.globus.exec.util.audit=DEBUG&apos; set in the log4j file,
the same log messages appeared as when the database was updated successfully the
night before. However, the there are no additional records in the database
gram_audit_table table for the job just run.

There are no error messages in the MySql logs.

When I do a &apos;show processlist&apos; in mysql, I see only the rft connection and
my client connection.

mysql&gt; show processlist;
+------+------+-----------------+---------------+---------+------+-------+------------------+
| Id   | User | Host            | db            | Command | Time | State | Info             |
+------+------+-----------------+---------------+---------+------+-------+------------------+
| 1730 | rft  | localhost:50645 | rft_database  | Sleep   |    0 |       | NULL             |
| 1862 | root | localhost       | auditDatabase | Query   |    0 | NULL  | show processlist |
+------+------+-----------------+---------------+---------+------+-------+------------------+


If I restart the container, the connection is not immediately made 
(which is not necessarily a problem).

When the first job/service is requested (same globusrun-ws as shown above),
the connection is made and kept open for some period. The account the container
runs as is &apos;globus&apos; below.  The database is updated with the audit information
for that job.

mysql&gt; show processlist;
+------+--------+-----------------+---------------+---------+------+-------+------------------+
| Id   | User   | Host            | db            | Command | Time | State | Info             |
+------+--------+-----------------+---------------+---------+------+-------+------------------+
| 1862 | root   | localhost       | auditDatabase | Query   |    0 | NULL  | show processlist |
| 1866 | rft    | localhost:58323 | rft_database  | Sleep   |   18 |       | NULL             |
| 1867 | globus | localhost:37386 | auditDatabase | Sleep   |  840 |       | NULL             |
+------+--------+-----------------+---------------+---------+------+-------+------------------+

An item to note: As I manually ran the mysql &apos;show processlist&apos; command, I
noticed that the rft user &apos;pinged&apos; the database at 60 second intervals to keep
the connection open.   The &apos;Time&apos; would always reset to zero after 59 while the
&apos;Command&apos; stayed at &apos;Sleep&apos;.

Another item to note: there is not message in the log indicating the update
was unsuccessful.  Or successful for that matter.</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who name="Stuart Martin">smartin@mcs.anl.gov</who>
            <bug_when>2008-02-12 10:21:11</bug_when>
            <thetext>*** Bug 5863 has been marked as a duplicate of this bug. ***</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who name="Stuart Martin">smartin@mcs.anl.gov</who>
            <bug_when>2009-03-19 09:48:31</bug_when>
            <thetext>

*** This bug has been marked as a duplicate of bug 6400 ***</thetext>
          </long_desc>
      
      

    </bug>

</bugzilla>