Return-Path: X-Original-To: apmail-couchdb-replication-archive@minotaur.apache.org Delivered-To: apmail-couchdb-replication-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id EA81611DA0 for ; Tue, 22 Apr 2014 17:24:13 +0000 (UTC) Received: (qmail 64071 invoked by uid 500); 22 Apr 2014 17:24:12 -0000 Delivered-To: apmail-couchdb-replication-archive@couchdb.apache.org Received: (qmail 64034 invoked by uid 500); 22 Apr 2014 17:24:12 -0000 Mailing-List: contact replication-help@couchdb.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: replication@couchdb.apache.org Delivered-To: mailing list replication@couchdb.apache.org Received: (qmail 64025 invoked by uid 99); 22 Apr 2014 17:24:12 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 22 Apr 2014 17:24:12 +0000 X-ASF-Spam-Status: No, hits=0.0 required=5.0 tests=NORMAL_HTTP_TO_IP,RCVD_IN_DNSWL_NONE,SPF_PASS,WEIRD_PORT X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of jens@couchbase.com designates 199.193.200.197 as permitted sender) Received: from [199.193.200.197] (HELO hub029-VA-6.exch029.serverdata.net) (199.193.200.197) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 22 Apr 2014 17:24:05 +0000 Received: from [10.0.1.9] (173.228.7.198) by east.exch029.serverdata.net (10.216.105.231) with Microsoft SMTP Server (TLS) id 14.3.174.1; Tue, 22 Apr 2014 10:23:41 -0700 From: Jens Alfke Content-Type: text/plain; charset="windows-1252" Content-Transfer-Encoding: quoted-printable Subject: CouchDB 1.5 throwing exceptions pulling attachments from Couchbase Sync Gateway Message-ID: <7A22A4FD-C227-4831-A0CD-B0EA5A614968@couchbase.com> Date: Tue, 22 Apr 2014 10:23:37 -0700 To: MIME-Version: 1.0 (Mac OS X Mail 7.3 \(1878.0\)) X-Mailer: Apple Mail (2.1878) X-Virus-Checked: Checked by ClamAV on apache.org A developer is reporting that a CouchDB pull replication, with source = the Couchbase Sync Gateway, is failing with Erlang exceptions. The cause = appears to be a MIME multipart response from a GET of a document with = attachments =97 he says =93the response of SG GET = /nam/image-97m333b8iah?revs=3Dtrue&open_revs=3D%5B%229-9f060576f801f3c9cea= 5c90013c6d182%22%5D&latest=3Dtrue properly returns a multipart document, = but it seems CouchDB 1.5 is unable to parse the data.=94 I don=92t think this is the known-and-recently-fixed issue with CouchDB = and chunked encoding. Replicating attachments to CouchDB has been = working for a while, and the developer reports "the documents only = containing 2 images did replicate from SG to CouchDB 1.5.=94 It may be = that the exact length or contents of this document are triggering some = kind of edge case in CouchDB. Anyway, I can=92t make head or tail of the Erlang crash logs; could = someone skilled in the art provide some insight into what happened to = CouchDB? Thanks! =97Jens > Using CouchDB 1.3 the pull replication fails completely. Erlang throws = some errors and completely restarts. >=20 > Using CouchDB 1.5 the pull replication does not fail, but is never = completed. It seems CouchDB is unable to parse the multipart response.=20= > CouchDB 1.5 logs: >=20 > [Tue, 22 Apr 2014 13:40:42 GMT] [error] [<0.17159.1>] Replication = crashing because GET = http://192.168.1.2:4985/nam/image-97m333b8iah?revs=3Dtrue&open_revs=3D%5B%= 229-9f060576f801f3c9cea5c90013c6d182%22%5D&latest=3Dtrue failed > [Tue, 22 Apr 2014 13:40:42 GMT] [error] [<0.17142.1>] ** Generic = server <0.17142.1> terminating=20 > ** Last message in was {'EXIT',<0.17159.1>,kaboom} > ** When Server state =3D=3D {state,<0.17123.1>,<0.17143.1>,20, > = {httpdb,"http://192.168.1.2:4985/nam/",nil, > [{"Accept","application/json"}, > {"User-Agent","CouchDB/1.5.0"}], > 30000, > [{socket_options, > = [{keepalive,true},{nodelay,false}]}], > 10,250,<0.17124.1>,20}, > {db,<0.17131.1>,<0.17132.1>,nil, > <<"1398170695581111">>,<0.17133.1>, > <0.17129.1>,<0.17135.1>, > {db_header,6,9,0, > {2230287,{3,6,2227482},1191}, > {2228708,9,508}, > {2232424,[],807}, > 0,nil,nil,1000}, > 9, > {btree,<0.17129.1>, > {2230287,{3,6,2227482},1191}, > = #Fun, > = #Fun, > #Fun, > = #Fun,snappy}, > {btree,<0.17129.1>, > {2228708,9,508}, > = #Fun, > = #Fun, > #Fun, > = #Fun,snappy}, > {btree,<0.17129.1>, > {2232424,[],807}, > #Fun, > #Fun, > = #Fun,nil,snappy}, > 9,<<"snagtracker-140417-tenpost">>, > = "/usr/local/var/lib/couchdb/snagtracker-140417-tenpost.couch", > [],[],nil, > {user_ctx,null,[],undefined}, > nil,1000, > = [before_header,after_header,on_file_open], > = [{user_ctx,{user_ctx,null,[],undefined}}], > snappy,nil,nil}, > [<0.17159.1>], > nil,nil, > {<0.17143.1>,#Ref<0.0.2.127076>}, > {rep_stats,1,1,0,0,0}, > nil,<0.17144.1>, > {batch,[],0}} > ** Reason for termination =3D=3D=20 > ** {process_died,<0.17159.1>,kaboom} >=20 > [Tue, 22 Apr 2014 13:40:42 GMT] [error] [<0.17142.1>] = {error_report,<0.17006.1>, > {<0.17142.1>,crash_report, > [[{initial_call, > = {couch_replicator_worker,init,['Argument__1']}}, > {pid,<0.17142.1>}, > {registered_name,[]}, > {error_info, > {exit, > {process_died,<0.17159.1>,kaboom}, > [{gen_server,terminate,6, > [{file,"gen_server.erl"},{line,744}]}, > {proc_lib,init_p_do_apply,3, > [{file,"proc_lib.erl"},{line,239}]}]}}, > {ancestors, > [<0.17123.1>,couch_replicator_job_sup, > couch_primary_services,couch_server_sup, > <0.17007.1>]}, > {messages,[{'EXIT',<0.17144.1>,normal}]}, > {links,[<0.17143.1>,<0.17123.1>]}, > {dictionary, > = [{last_stats_report,{1398,170695,606206}}]}, > {trap_exit,true}, > {status,running}, > {heap_size,1598}, > {stack_size,27}, > {reductions,305}], > [{neighbour, > [{pid,<0.17143.1>}, > {registered_name,[]}, > {initial_call,{erlang,apply,2}}, > {current_function,{gen,do_call,4}}, > {ancestors,[]}, > {messages,[]}, > {links,[<0.17142.1>]}, > {dictionary,[]}, > {trap_exit,false}, > {status,waiting}, > {heap_size,1598}, > {stack_size,22}, > {reductions,249}]}]]}}