From: Eric Bollengier Date: Sun, 6 Jan 2008 19:56:42 +0000 (+0000) Subject: ebl Fixes #1034 which cause mysql to hang the connection after X-Git-Tag: Release-3.0.0~2005 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=9ff14035d580255c648cafd0b43645583c7b26b4;p=bacula%2Fbacula ebl Fixes #1034 which cause mysql to hang the connection after 8 hours. git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/trunk@6246 91ce42f0-d328-0410-95d8-f526ca767f89 --- 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 index 0000000000..0ee9d624e5 --- /dev/null +++ b/bacula/patches/2.2.7-mysql-batch-timeout.patch @@ -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; + } diff --git a/bacula/src/cats/mysql.c b/bacula/src/cats/mysql.c index 8a2832b0ba..514f7103d0 100644 --- a/bacula/src/cats/mysql.c +++ b/bacula/src/cats/mysql.c @@ -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; } diff --git a/bacula/technotes-2.3 b/bacula/technotes-2.3 index f2a8c8a18d..366a13fd94 100644 --- a/bacula/technotes-2.3 +++ b/bacula/technotes-2.3 @@ -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.