Hi all, I noticed that under high concurrency the Erlang emulator running CouchDB occasionally hits a limit on the number of available ports during a view query. I included an example error_report from the server log below. When I increased ERL_MAX_PORTS to 50000 (chosen ~arbitrarily) the crashes disappeared. Hope it helps,

Adam

[Wed, 05 Nov 2008 18:33:02 GMT] [error] [<0.13117.27>] {error_report,<0.21.0>,
    {<0.13117.27>,crash_report,
     [[{pid,<0.13117.27>},
       {registered_name,[]},
       {error_info,
           {error,system_limit,
               [{erlang,open_port,[{spawn,"couch_erl_driver"},[]]},
                {couch_util,drv_port,0},
                {couch_util,collate,3},
                {couch_view,less_same_type,2},
                {couch_view,less_list,2},
                {lists,dropwhile,2},
                {couch_btree,reduce_stream_kp_node,11},
                {couch_btree,fold_reduce,7}]}},
       {initial_call,
           {mochiweb_socket_server,acceptor_loop,
[{<0.58.0>,#Port<0.148>,#Fun<mochiweb_http. 1.62821608>}]}},
       {ancestors,[couch_httpd,<0.53.0>,couch_server_sup,<0.1.0>]},
       {messages,[]},
       {links,[<0.58.0>,#Port<0.546707>]},
       {dictionary,
           [{mochiweb_request_qs,
                [{"group","true"},{"key","\"obama\""}]},
            {mochiweb_request_force_close,true}]},
       {trap_exit,false},
       {status,running},
       {heap_size,2584},
       {stack_size,23},
       {reductions,2484}],
      []]}}

Reply via email to