Return-Path: X-Original-To: apmail-couchdb-user-archive@www.apache.org Delivered-To: apmail-couchdb-user-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 2B924B2F1 for ; Mon, 16 Jan 2012 12:43:34 +0000 (UTC) Received: (qmail 67930 invoked by uid 500); 16 Jan 2012 12:43:32 -0000 Delivered-To: apmail-couchdb-user-archive@couchdb.apache.org Received: (qmail 67848 invoked by uid 500); 16 Jan 2012 12:43:31 -0000 Mailing-List: contact user-help@couchdb.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@couchdb.apache.org Delivered-To: mailing list user@couchdb.apache.org Received: (qmail 67840 invoked by uid 99); 16 Jan 2012 12:43:31 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 16 Jan 2012 12:43:31 +0000 X-ASF-Spam-Status: No, hits=-0.7 required=5.0 tests=RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of carl.henrik.lundgren@gmail.com designates 209.85.160.180 as permitted sender) Received: from [209.85.160.180] (HELO mail-gy0-f180.google.com) (209.85.160.180) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 16 Jan 2012 12:43:24 +0000 Received: by ghrr18 with SMTP id r18so538118ghr.11 for ; Mon, 16 Jan 2012 04:43:04 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type:content-transfer-encoding; bh=tpjpjapKhA12nEEA+pSt+hbxfEhSkPRgEO4KqezAtxc=; b=igBG8XfT1QneggyrqRK7aj/cVN7sUHsdC7mS+Q/a5MwyWdPc/LSH3SVy6Y2JIPUxJE BfuKTJBOf3FXi9rqIKl4S09pDsQEu1SgQWcZqBI05fGzfwFVnWRrbkvZpAewPE1vVvb/ dd/qW6OBoQEvKD5xhYcqLGFJ4Qf7UPCi5Pzt4= MIME-Version: 1.0 Received: by 10.236.181.168 with SMTP id l28mr16440802yhm.53.1326717784145; Mon, 16 Jan 2012 04:43:04 -0800 (PST) Received: by 10.236.32.5 with HTTP; Mon, 16 Jan 2012 04:43:04 -0800 (PST) In-Reply-To: References: Date: Mon, 16 Jan 2012 13:43:04 +0100 Message-ID: Subject: Re: Successful bulk operation but is followed stacktrace in log From: Henrik Lundgren To: user@couchdb.apache.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Maybe this problem is trivial, hence the lack of response :-) Anyway, I think I have found the root cause: The view function fails to send a change because the socket is closed. This is because we use the changes feed just as a trigger, closing it when we recieve the first change. The connection is closed when subsequent changes are evaluated and the stacktrace shows up in the log. /Henrik On Thu, Jan 12, 2012 at 2:13 PM, Henrik Lundgren wrote: > We are seeing the stacktrace below quite frequently on our production ser= vers: > > [Thu, 12 Jan 2012 08:43:38 GMT] [info] [<0.16217.138>] 10.21.39.2 - - > 'POST' /inbox_db/_bulk_docs 201 > > [Thu, 12 Jan 2012 08:43:38 GMT] [error] [<0.16095.138>] Uncaught error > in HTTP request: {error,{case_clause,{error,enotconn}}} > > [Thu, 12 Jan 2012 08:43:38 GMT] [info] [<0.16095.138>] Stacktrace: > [{mochiweb_request,get,2}, > =A0 =A0 =A0 =A0 =A0 =A0 {couch_httpd_external,json_req_obj,3}, > =A0 =A0 =A0 =A0 =A0 =A0 {couch_query_servers,filter_docs,5}, > =A0 =A0 =A0 =A0 =A0 =A0 {couch_changes,'-make_filter_fun/4-fun-1-',6}, > =A0 =A0 =A0 =A0 =A0 =A0 {couch_changes,changes_enumerator,2}, > =A0 =A0 =A0 =A0 =A0 =A0 {couch_btree,stream_kv_node2,8}, > =A0 =A0 =A0 =A0 =A0 =A0 {couch_btree,stream_kp_node,8}, > =A0 =A0 =A0 =A0 =A0 =A0 {couch_btree,fold,4}] > > The bulk operation succeeds (201) but the stacktraces are worrying. > The application subsequently tries to save a document in another > database on the same couchdb instance. > That request fails with a dropped connection every so often. > > We have a changes feed that also fails frequently: > 'GET' /inbox_db/_changes?feed=3Dcontinuous&since=3D79362&filter=3DStandar= dRecordHeader%2Funprocessed_files&heartbeat=3D9000 > 500 > > Here's the filter function: > > function(doc) { return doc.state =3D=3D=3D void 0 && doc._attachments && > doc._attachments.payload} > > Maybe these two errors are connected? > > We are currently using CouchDb 1.0.2 > > Anybody got an idea what could be wrong? > > /Henrik