Return-Path: X-Original-To: apmail-couchdb-commits-archive@www.apache.org Delivered-To: apmail-couchdb-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 6B44011981 for ; Tue, 26 Aug 2014 09:45:57 +0000 (UTC) Received: (qmail 81002 invoked by uid 500); 26 Aug 2014 09:45:57 -0000 Delivered-To: apmail-couchdb-commits-archive@couchdb.apache.org Received: (qmail 80827 invoked by uid 500); 26 Aug 2014 09:45:57 -0000 Mailing-List: contact commits-help@couchdb.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@couchdb.apache.org Delivered-To: mailing list commits@couchdb.apache.org Received: (qmail 80654 invoked by uid 99); 26 Aug 2014 09:45:57 -0000 Received: from tyr.zones.apache.org (HELO tyr.zones.apache.org) (140.211.11.114) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 26 Aug 2014 09:45:57 +0000 Received: by tyr.zones.apache.org (Postfix, from userid 65534) id D224BA03B4A; Tue, 26 Aug 2014 09:45:56 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: rnewson@apache.org To: commits@couchdb.apache.org Date: Tue, 26 Aug 2014 09:45:59 -0000 Message-Id: <29ed0ea1700946e4b5c2d53b0b4de7f3@git.apache.org> In-Reply-To: <8277b323654141428b7adddf3d58b244@git.apache.org> References: <8277b323654141428b7adddf3d58b244@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: [04/26] couch commit: updated refs/heads/windsor-merge to 14dc5e9 Always report why couch_server crashes On servers with a large number of open databases the couch_server state is too large to be logged, and so when it crashes we miss the reason for the crash. This patch adds an extra message that redacts enough of the server state to ensure a properly-formatted message. BugzID: 26902 Project: http://git-wip-us.apache.org/repos/asf/couchdb-couch/repo Commit: http://git-wip-us.apache.org/repos/asf/couchdb-couch/commit/6083a37b Tree: http://git-wip-us.apache.org/repos/asf/couchdb-couch/tree/6083a37b Diff: http://git-wip-us.apache.org/repos/asf/couchdb-couch/diff/6083a37b Branch: refs/heads/windsor-merge Commit: 6083a37b87093d314adb491bab6d2e81e7c71610 Parents: f3e4538 Author: Adam Kocoloski Authored: Fri Feb 28 12:45:02 2014 -0500 Committer: Robert Newson Committed: Tue Aug 26 10:42:38 2014 +0100 ---------------------------------------------------------------------- src/couch_server.erl | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/couchdb-couch/blob/6083a37b/src/couch_server.erl ---------------------------------------------------------------------- diff --git a/src/couch_server.erl b/src/couch_server.erl index 28dfc79..964ecad 100644 --- a/src/couch_server.erl +++ b/src/couch_server.erl @@ -210,7 +210,9 @@ init([]) -> update_lru_on_read=UpdateLruOnRead, start_time=couch_util:rfc1123_date()}}. -terminate(_Reason, _Srv) -> +terminate(Reason, Srv) -> + ?LOG_ERROR("couch_server terminating with ~p, state ~2048p", [Reason, + Srv#server{dbname_regexp = redacted, lru = redacted}]), ets:foldl(fun(#db{main_pid=Pid}, _) -> couch_util:shutdown_sync(Pid) end, nil, couch_dbs), ok.