public
Created

Failed continuous replication with CouchDB

  • Download Gist
command.sh
Shell
1
curl -H 'Content-Type: application/json' -X POST http://localhost:5984/_replicate -d ' {"source": "http://isaacs.iriscouch.com/registry", "target": "npmregistry", "create_target": true, "continuous": true} '
log.txt
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187
...
{<<"xml-markup">>,2369,
[{6,
<<16,10,146,209,247,254,148,68,226,133,
54,93,206,130,3,222>>}]},
{<<"xjs">>,2367,
[{11,
<<5,213,205,0,34,152,137,78,213,130,169,
245,191,245,167,98>>}]},
{<<"x-core">>,2366,
[{13,
<<240,75,6,56,85,218,35,21,57,209,148,
90,53,128,45,158>>}]},
{<<"x">>,2365,
[{9,
<<16,64,51,88,152,10,186,35,155,122,154,
247,129,117,88,157>>}]},
{<<"wwwdude">>,2364,
[{19,
<<235,129,146,70,27,136,100,175,89,116,
15,155,68,225,104,202>>}]},
{<<"wurfl-client">>,2363,
[{3,
<<168,195,228,84,214,217,201,178,59,114,
144,235,100,134,110,128>>}]},
{<<"wu">>,2362,
[{4,
<<243,7,211,160,14,122,18,18,183,148,
155,203,150,22,16,136>>}]},
{<<"wsscraper">>,2361,
[{3,
<<148,168,79,233,179,223,70,184,214,173,
72,81,227,137,218,225>>},
{4,
<<240,138,140,26,73,89,170,96,247,21,241,
42,49,155,253,34>>},
{4,
<<71,168,166,242,152,24,7,137,70,84,200,
183,28,153,58,198>>}]},
{<<"wscomm">>,2360,
[{47,
<<128,175,253,164,93,165,35,229,124,135,
184,212,62,247,62,201>>},
{4,
<<201,6,41,134,215,65,143,37,235,253,207,
251,78,181,112,14>>},
{4,
<<192,183,14,250,104,193,63,75,211,27,74,
189,169,52,44,67>>},
{4,
<<187,103,101,49,3,86,176,79,177,225,225,
7,109,185,210,161>>},
{4,
<<162,92,113,51,85,28,11,71,184,251,97,
113,65,9,20,177>>},
{4,
<<63,181,237,213,202,205,192,154,64,201,
200,187,159,89,154,74>>},
{4,
<<55,94,97,79,160,39,129,241,200,152,
246,212,197,237,130,104>>}]}],
[{<<"workhorse">>,2356,
[{30,
<<195,154,226,221,216,103,161,55,7,58,
40,156,23,9,242,41>>}]},
{<<"world-db">>,2357,
[{6,
<<234,239,27,235,106,187,235,211,233,
3,162,138,127,70,170,129>>}]}]},
15943,15943,0}
** Reason for termination ==
** {{nocatch,{invalid_json,<<>>}},
[{couch_util,json_decode,1,[{file,"couch_util.erl"},{line,403}]},
{couch_rep_reader,'-open_doc_revs/3-lc$^1/1-1-',1,
[{file,"couch_rep_reader.erl"},{line,225}]},
{couch_rep_reader,open_doc_revs,3,
[{file,"couch_rep_reader.erl"},{line,225}]},
{couch_rep_reader,'-spawn_document_request/4-fun-0-',5,
[{file,"couch_rep_reader.erl"},{line,274}]}]}
[error] [<0.15350.0>] {error_report,<0.31.0>,
{<0.15350.0>,crash_report,
[[{initial_call,
{couch_rep_missing_revs,init,['Argument__1']}},
{pid,<0.15350.0>},
{registered_name,[]},
{error_info,
{exit,
{{nocatch,{invalid_json,<<>>}},
[{couch_util,json_decode,1,
[{file,"couch_util.erl"},{line,403}]},
{couch_rep_reader,
'-open_doc_revs/3-lc$^1/1-1-',1,
[{file,"couch_rep_reader.erl"},{line,225}]},
{couch_rep_reader,open_doc_revs,3,
[{file,"couch_rep_reader.erl"},{line,225}]},
{couch_rep_reader,
'-spawn_document_request/4-fun-0-',5,
[{file,"couch_rep_reader.erl"},{line,274}]}]},
[{gen_server,terminate,6,
[{file,"gen_server.erl"},{line,737}]},
{proc_lib,init_p_do_apply,3,
[{file,"proc_lib.erl"},{line,227}]}]}},
{ancestors,
[<0.15325.0>,couch_rep_sup,couch_primary_services,
couch_server_sup,<0.32.0>]},
{messages,[]},
{links,[<0.15351.0>]},
{dictionary,[]},
{trap_exit,true},
{status,running},
{heap_size,75025},
{stack_size,24},
{reductions,15347}],
[]]}}
 
=CRASH REPORT==== 6-Jan-2012::00:04:16 ===
crasher:
initial call: couch_rep_missing_revs:init/1
pid: <0.15350.0>
registered_name: []
exception exit: {{nocatch,{invalid_json,<<>>}},
[{couch_util,json_decode,1,
[{file,"couch_util.erl"},{line,403}]},
{couch_rep_reader,'-open_doc_revs/3-lc$^1/1-1-',1,
[{file,"couch_rep_reader.erl"},{line,225}]},
{couch_rep_reader,open_doc_revs,3,
[{file,"couch_rep_reader.erl"},{line,225}]},
{couch_rep_reader,'-spawn_document_request/4-fun-0-',5,
[{file,"couch_rep_reader.erl"},{line,274}]}]}
in function gen_server:terminate/6 (gen_server.erl, line 737)
ancestors: [<0.15325.0>,couch_rep_sup,couch_primary_services,
couch_server_sup,<0.32.0>]
messages: []
links: [<0.15351.0>]
dictionary: []
trap_exit: true
status: running
heap_size: 75025
stack_size: 24
reductions: 15347
neighbours:
[error] [<0.81.0>] {error_report,<0.31.0>,
{<0.81.0>,supervisor_report,
[{supervisor,{local,couch_rep_sup}},
{errorContext,child_terminated},
{reason,
{{nocatch,{invalid_json,<<>>}},
[{couch_util,json_decode,1,
[{file,"couch_util.erl"},{line,403}]},
{couch_rep_reader,
'-open_doc_revs/3-lc$^1/1-1-',1,
[{file,"couch_rep_reader.erl"},{line,225}]},
{couch_rep_reader,open_doc_revs,3,
[{file,"couch_rep_reader.erl"},{line,225}]},
{couch_rep_reader,
'-spawn_document_request/4-fun-0-',5,
[{file,"couch_rep_reader.erl"},
{line,274}]}]}},
{offender,
[{pid,<0.15325.0>},
{name,"f40b3a7c63a687f09f79f402ec6ee38f"},
{mfargs,{gen_server,start_link,undefined}},
{restart_type,temporary},
{shutdown,1},
{child_type,worker}]}]}}
 
=SUPERVISOR REPORT==== 6-Jan-2012::00:04:16 ===
Supervisor: {local,couch_rep_sup}
Context: child_terminated
Reason: {{nocatch,{invalid_json,<<>>}},
[{couch_util,json_decode,1,
[{file,"couch_util.erl"},{line,403}]},
{couch_rep_reader,'-open_doc_revs/3-lc$^1/1-1-',1,
[{file,"couch_rep_reader.erl"},
{line,225}]},
{couch_rep_reader,open_doc_revs,3,
[{file,"couch_rep_reader.erl"},
{line,225}]},
{couch_rep_reader,'-spawn_document_request/4-fun-0-',5,
[{file,"couch_rep_reader.erl"},
{line,274}]}]}
Offender: [{pid,<0.15325.0>},
{name,"f40b3a7c63a687f09f79f402ec6ee38f"},
{mfargs,{gen_server,start_link,undefined}},
{restart_type,temporary},
{shutdown,1},
{child_type,worker}]
output.json
JSON
1
{"ok":true,"_local_id":"f40b3a7c63a687f09f79f402ec6ee38f"}

If I set continue:false, it works well (takes ages, but works well)

nope, with continue:false it just goes a bit farther (2 docs instead of only one replicated)

could be an issue with target db ?

Please sign in to comment on this gist.

Something went wrong with that request. Please try again.