From: Evan Prodromou Date: Fri, 2 Dec 2011 20:48:43 +0000 (-0500) Subject: Merge branch 'master' of gitorious.org:statusnet/mainline X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=821904230ddc971feb23eccdf06c41be4568958c;hp=ad2fd9abd43e55e53efa43e781e2877d3e7eec24;p=quix0rs-gnu-social.git Merge branch 'master' of gitorious.org:statusnet/mainline --- diff --git a/lib/framework.php b/lib/framework.php index 4458313eb9..e7a1829bc6 100644 --- a/lib/framework.php +++ b/lib/framework.php @@ -160,6 +160,15 @@ function PEAR_ErrorToPEAR_Exception($err) common_log(LOG_ERR, "PEAR Error: $msg ($userInfo)"); + // HACK: queue handlers get kicked by the long-query killer, and + // keep the same broken connection. We die here to get a new + // process started. + + if (php_sapi_name() == 'cli' && preg_match('/nativecode=2006/', $userInfo)) { + common_log(LOG_ERR, "Lost DB connection; dying."); + exit(100); + } + if ($err->getCode()) { throw new PEAR_Exception($msg, $err, $err->getCode()); } else {