About the node show down when occur riak_searc error of too_many_resut

Ryan Zezeski rzezeski at basho.com
Fri Feb 8 18:35:34 EST 2013


Jason,

Riak Search has a limit of 100k results at which point it halts processing
by throwing an exception.  It does this to protect itself from having to
build an indeterminately sized list and then sort it.  You can raise this
limit but you might start seeing large process heaps using lots of CPU for
GC or sorting.

I'm having a bit of trouble understanding your second point.  Are you
saying that the node goes down after this error?  The only reason I see
that happening is if you run this query (or others that also match large
results) many times in succession causing max restart events (I'm referring
to Erlang/OTP supervisor/worker restarts) to occur eventually reaching up
to the root supervisor and thus exiting.

-Z


On Tue, Jan 22, 2013 at 5:16 AM, 郎咸武 <langxianzhe at gmail.com> wrote:

> Hi all
>
> The default value of 100,000 can be custom tuned with the
> max_search_results setting in the etc/app.config file.
>
> I using the default value. There are 1,000,000 K/V. I only
> invoke riakc_pb_socket:search(Pid, Bucket, "name:u1*")[1] when  the node
> shutdown[2].
> The error is an obvious out of the default value.
> But the node is showdown. This is really out of my expectation.
>
> Is this a bug?
> Who can give me  some advice?
>
> Cheers ,Jason
>
>
> The enviroment:
> Erlang R14B04 (erts-5.8.5)
> FreeBSD meda082 9.0-RELEASE FreeBSD 9.0-RELEASE #0: Tue Jan  3 07:46:30
> UTC 2012
> riak1.2
> riakclint 1.3
>
> [1]{error,<<"Error processing incoming message: throw:{too_many_results,\n
>                                          {scope"...>>}
>
> [2]
> (riak at 127.0.0.1)1> 17:03:55.626 [error] gen_server <0.2736.0> terminated
> with reason:
> {throw,{too_many_results,{scope,#Ref<0.0.0.8359>,"test_riak_json
>
> ","value",{scope,#Ref<0.0.0.8358>,undefined,"name",{range_sized,#Ref<0.0.0.8362>,{inclusive,<<"u1">>},{inclusive,<<"u1\377">>},all,undefined}}}},[{ria
>
> k_search_client,'-search/7-fun-0-',4},{riak_search_client,fold_results,5},{riak_search_client,search,8},{riak_search_client,search_doc,8},{riak_search
>
> _utils,run_query,7},{riak_search_pb_query,run_query,7},{riak_search_pb_query,process,2},{riak_api_pb_server,process_message,4}]}^M^M
> 17:03:55.643 [error] CRASH REPORT Process <0.2736.0> with 1 neighbours
> exited with reason:
> {throw,{too_many_results,{scope,#Ref<0.0.0.8359>,"test_riak
>
> _json","value",{scope,#Ref<0.0.0.8358>,undefined,"name",{range_sized,#Ref<0.0.0.8362>,{inclusive,<<"u1">>},{inclusive,<<"u1\377">>},all,undefined}}}},
>
> [{riak_search_client,'-search/7-fun-0-',4},{riak_search_client,fold_results,5},{riak_search_client,search,8},{riak_search_client,search_doc,8},{riak_s
> earch_utils,run_query,7},{riak_search_pb_query,run_query,7},{riak_search_pb_query,process,2},{riak_api_pb_server,process_message,4}]}
> in gen_server:te
> rminate/6^M^M
>
>
>
> --
> 只为成功找方法,不为失败找理由
> _______________________________________________
> riak-users mailing list
> riak-users at lists.basho.com
> http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.basho.com/pipermail/riak-users_lists.basho.com/attachments/20130208/bd5de2b5/attachment.html>


More information about the riak-users mailing list