From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ian Jackson Subject: [OSSTEST PATCH 05/27] standalone: Set very long SQLite3 busy timeout in Perl Date: Wed, 16 Sep 2015 14:35:08 +0100 Message-ID: <1442410530-9665-6-git-send-email-ian.jackson@eu.citrix.com> References: <1442410530-9665-1-git-send-email-ian.jackson@eu.citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail6.bemta5.messagelabs.com ([195.245.231.135]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1ZcCsS-0000rv-Qx for xen-devel@lists.xenproject.org; Wed, 16 Sep 2015 13:36:00 +0000 In-Reply-To: <1442410530-9665-1-git-send-email-ian.jackson@eu.citrix.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: xen-devel@lists.xenproject.org Cc: Ian Jackson , Ian Campbell List-Id: xen-devel@lists.xenproject.org Without this, big standalone-generate-dump-flight-runvars jobs may trying to serialise so much work that SQLite3 times out. And we are about to introduce an optimisation which makes this much more likely. In standalone mode we probably don't care much about this timeout at all. (It might even be that the user is using sqlite(3) and has effectively locked the database interactively for an extended period.) We would prefer to rely on the user to stop anything that seems to have become stuck. So set the timeout to 10ks. Signed-off-by: Ian Jackson --- Osstest/JobDB/Standalone.pm | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Osstest/JobDB/Standalone.pm b/Osstest/JobDB/Standalone.pm index 45ec9ca..431ba5a 100644 --- a/Osstest/JobDB/Standalone.pm +++ b/Osstest/JobDB/Standalone.pm @@ -52,6 +52,9 @@ sub open ($) { ShowErrorStatement => 1, }) or die "could not open standalone db $dbi"; + + $dbh->sqlite_busy_timeout(10E6); # 10ks + return $dbh; } -- 1.7.10.4