]> git.sur5r.net Git - bacula/bacula/commitdiff
ebl Fixes #1034 which cause mysql to hang the connection after
authorEric Bollengier <eric@eb.homelinux.org>
Sun, 6 Jan 2008 19:56:42 +0000 (19:56 +0000)
committerEric Bollengier <eric@eb.homelinux.org>
Sun, 6 Jan 2008 19:56:42 +0000 (19:56 +0000)
     8 hours.

git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/trunk@6246 91ce42f0-d328-0410-95d8-f526ca767f89

bacula/patches/2.2.7-mysql-batch-timeout.patch [new file with mode: 0644]
bacula/src/cats/mysql.c
bacula/technotes-2.3

diff --git a/bacula/patches/2.2.7-mysql-batch-timeout.patch b/bacula/patches/2.2.7-mysql-batch-timeout.patch
new file mode 100644 (file)
index 0000000..0ee9d62
--- /dev/null
@@ -0,0 +1,15 @@
+Index: src/cats/mysql.c
+===================================================================
+--- src/cats/mysql.c   (rĂ©vision 6192)
++++ src/cats/mysql.c   (copie de travail)
+@@ -205,6 +205,10 @@
+    Dmsg3(100, "opendb ref=%d connected=%d db=%p\n", mdb->ref_count,
+          mdb->connected, mdb->db);
++   /* Set connection timeout to 8 days specialy for batch mode */
++   sql_query(mdb, "SET wait_timeout=691200");
++   sql_query(mdb, "SET interactive_timeout=691200");
++
+    V(mutex);
+    return 1;
+ }
index 8a2832b0ba8d1ca8a4cc1d9eb930fbd33455860f..514f7103d02df3d34467a4f67450100be6614916 100644 (file)
@@ -205,6 +205,10 @@ db_open_database(JCR *jcr, B_DB *mdb)
    Dmsg3(100, "opendb ref=%d connected=%d db=%p\n", mdb->ref_count,
          mdb->connected, mdb->db);
 
+   /* Set connection timeout to 8 days specialy for batch mode */
+   sql_query(mdb, "SET wait_timeout=691200");
+   sql_query(mdb, "SET interactive_timeout=691200");
+
    V(mutex);
    return 1;
 }
index f2a8c8a18d426e9aaa778c6f93aae6a78412844e..366a13fd9485942795c492b79d5a568022e348bc 100644 (file)
@@ -2,6 +2,7 @@
 
 General:
 06Jan08
+ebl  Fixes #1034 which cause mysql to hang the connection after 8h
 ebl  Change default statistics target of filename.name and path.path
      fields for PostgreSQL. This speeds lookup by indexes. Thanks
      to Marc Cousin.