We are no longer offering accounts on this server. Consider https://gitlab.freedesktop.org/ as a place to host projects.

Commit 8cdbef09 authored by Evan Prodromou's avatar Evan Prodromou

die when we get a bad connection error

parent cab76836
......@@ -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/', $msg)) {
common_log(LOG_ERR, "Lost DB connection; dying.");
if ($err->getCode()) {
throw new PEAR_Exception($msg, $err, $err->getCode());
} else {
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment