couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From david martin <david.mar...@lymegreen.co.uk>
Subject Re: Erlang view timeout
Date Wed, 08 May 2013 18:26:58 GMT
I have changed this value in the source and recompiled and it makes no difference what it is
set to it always times out at the same point.

I would very much like to know what is the real change in the source  to change this timeout.

It probably is in some OTP supervisor higher up the supervision chain.

It looks like some defensive programming to stop denial of service by running complex Erlang
views .




whatever it is ,  it renders
On 07/05/13 10:27, Paul Hirst wrote:
> The one document which is causing me trouble contains ~400k entries in an array and I
want to do an emit for each row. So it's a bit silly really. It just worked when I had <100k
entries but I've clearly pushed it too far.
> I think I'll look into splitting my documents up. That's probably a more sustainable
approach, but if I could have tweaked the timeout it would have been a nice quick fix for
the moment.
>
> -----Original Message-----
> From: Robert Newson [mailto:rnewson@apache.org]
> Sent: 07 May 2013 10:06
> To: user@couchdb.apache.org
> Subject: Re: Erlang view timeout
>
> Ah, sorry. Reading couch_native_process.erl it seems you can't set that timeout without
a remote shell. How big are these documents?
>
> On 7 May 2013 09:57, Paul Hirst <paul.hirst@sophos.com> wrote:
>> I tried that but it didn't seem to help. The indexing process stays on the status
page in futon for about 7 seconds after I trigger the view and then disappears again without
successfully completing, so I assumed changing that setting wasn't affecting the erlang view
timeout (os_process_timeout rather sounded like an external process kind of thing only).
>>
>> I'll try setting it even larger (I went for 50000) but maybe I just need to reduce
the size of my documents somewhat.
>>
>> Thanks.
>>
>> -----Original Message-----
>> From: Robert Newson [mailto:rnewson@apache.org]
>> Sent: 07 May 2013 09:41
>> To: user@couchdb.apache.org
>> Subject: Re: Erlang view timeout
>>
>> [couchdb]
>> os_process_timeout = 5000
>>
>> so curl -XPUT localhost:5984/_config/couchdb/os_process_timeout -d '"30000"' will
boost to 30s.
>>
>> B.
>>
>> On 7 May 2013 09:30, Paul Hirst <paul.hirst@sophos.com> wrote:
>>> I decided to rewrite some of my javascript views in Erlang to get a bit more
performance and hopefully avoid some problems I was seeing with huge documents. However I'm
running into timeout problems.
>>>
>>> In the log I get this shortly after trying to query the view:
>>>
>>> ** Reason for termination ==
>>> ** {timeout,{gen_server,call,
>>>                          [<0.1905.0>,
>>>                           {prompt,[<<"map_doc">>,
>>>                                    {[{<<"_id">>,
>>>
>>> I get the impression from reading the source that erlang views might
>>> have a default timeout of 5 seconds (presumably per document?). I'm
>>> mostly guessing based on the line
>>>
>>> -record(evstate, {ddocs, funs=[], query_config=[], list_pid=nil, timeout=5000}).
>>>
>>> Near the top of couch_native_process.erl
>>>
>>> I couldn't see anything in the configuration which would obviously let me change
this. Does anyone have any ideas?
>>> Thanks.
>>>
>>> Paul
>>>
>>> ________________________________
>>>
>>> Sophos Limited, The Pentagon, Abingdon Science Park, Abingdon, OX14 3YP, United
Kingdom.
>>> Company Reg No 2096520. VAT Reg No GB 991 2418 08.
>> ________________________________
>>
>> Sophos Limited, The Pentagon, Abingdon Science Park, Abingdon, OX14 3YP, United Kingdom.
>> Company Reg No 2096520. VAT Reg No GB 991 2418 08.
> ________________________________
>
> Sophos Limited, The Pentagon, Abingdon Science Park, Abingdon, OX14 3YP, United Kingdom.
> Company Reg No 2096520. VAT Reg No GB 991 2418 08.
>
>


-- 
David Martin


Mime
View raw message