Closed behrad closed 9 years ago
This is the underlying error message when couchbeam_view:fetch returns a timeout!
CRASH REPORT Process <0.5963.0> with 0 neighbours crashed with reason: {timeout,[{couchbeam_view_stream,do_init_stream,2,[{file,"src/couchbeam_view_stream.erl"},{line,116}]},{couchbeam_view_stream,init_stream,5,[{file,"src/couchbeam_view_stream.erl"},{line,72}]},{proc_lib,init_p_do_apply,3,[{file,"proc_lib.erl"},{line,227}]}]}
Do you have any useful trace I can use?
Was not this useful?
{timeout,[{couchbeam_view_stream,do_init_stream,2,[{file,"src/couchbeam_view_stream.erl"},{line,116}]},{couchbeam_view_stream,init_stream,5,[{file,"src/couchbeam_view_stream.erl"},{line,72}]},{proc_lib,init_p_do_apply,3,[{file,"proc_lib.erl"},{line,227}]}]}
ah sorry,.... was confused by the one lie textarea. Yes it is, thanks!
;)
Ah well it's expected that the process crash at this point. It exit with the timeout reason.
Can't get you! This is not a normal API behavior. When an error crashes the process, I would like to see the specific error returned to me, not 'timeout'
Well are you actually sure there is an error before? Any test that could help me to reproduce it?
Try to pass invalid start/end-key to your calls.
yeah. I did and didn't reproduce it.
On Wed, Jan 22, 2014 at 10:21 PM, Behrad notifications@github.com wrote:
Try to pass invalid start/end-key to your calls.
— Reply to this email directly or view it on GitHubhttps://github.com/benoitc/couchbeam/issues/102#issuecomment-33069559 .
oh ok, then I'll try it and let you know in a few days
2014/1/23 Benoit Chesneau notifications@github.com
yeah. I did and didn't reproduce it.
On Wed, Jan 22, 2014 at 10:21 PM, Behrad notifications@github.com wrote:
Try to pass invalid start/end-key to your calls.
— Reply to this email directly or view it on GitHub< https://github.com/benoitc/couchbeam/issues/102#issuecomment-33069559> .
— Reply to this email directly or view it on GitHubhttps://github.com/benoitc/couchbeam/issues/102#issuecomment-33069649 .
--Behrad
thanks :)
On Wed, Jan 22, 2014 at 10:25 PM, Behrad notifications@github.com wrote:
oh ok, then I'll try it and let you know in a few days
2014/1/23 Benoit Chesneau notifications@github.com
yeah. I did and didn't reproduce it.
On Wed, Jan 22, 2014 at 10:21 PM, Behrad notifications@github.com wrote:
Try to pass invalid start/end-key to your calls.
— Reply to this email directly or view it on GitHub< https://github.com/benoitc/couchbeam/issues/102#issuecomment-33069559> .
— Reply to this email directly or view it on GitHub< https://github.com/benoitc/couchbeam/issues/102#issuecomment-33069649> .
--Behrad
— Reply to this email directly or view it on GitHubhttps://github.com/benoitc/couchbeam/issues/102#issuecomment-33069924 .
ping
@benoitc sorry, busy these days. I will post in a day or two.
pardon for the delay @benoitc
You can simply call a non-existing view name by
couchbeam_view:fold(fun({Row},Acc) -> [Row|Acc] end,[],Db,{<<"invalid_name">>, <<"some_design_doc">>},[{reduce,false},{startkey, [<<"00">>]},{endkey, [<<"01">>]}]).
you will see couchdb immediately returns 404 but the above call blocks until it times out!!
I would not expect this behavior for my call, and it also will freeze my whole system under load.
Fixed in master.
When a view call gets an error from couchdb (e.g. bad starkey, bad request) OR in underlying transport gen_server (connect_failed) the process crashes (which it should have been handled), since couchbeam_view waits till it timeouts.