couchdb-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jan Lehnardt <...@apache.org>
Subject Re: Big problems with writes to _config
Date Wed, 28 Oct 2009 11:09:56 GMT
HI,

On 28 Oct 2009, at 03:46, Adam Kocoloski wrote:

> On Oct 27, 2009, at 7:49 PM, eric casteleijn wrote:
>
> 1) extending or disabling the couch_config gen_server timeout.  The  
> default is 5000 milliseconds.  This is a one-line patch.
>
> […]
>

> In each case the response times for PUT/_config/... may become  
> uncomfortably long, but at least you won't be serving 500s from  
> couch. Best, Adam

great analysis Alan. Here's the proposed patch for 1) that sets the  
gen_server timeout to 60 seconds:

--- a/src/couchdb/couch_config.erl
+++ b/src/couchdb/couch_config.erl
@@ -37,7 +37,7 @@


  start_link(IniFiles) ->
-    gen_server:start_link({local, ?MODULE}, ?MODULE, IniFiles, []).
+    gen_server:start_link({local, ?MODULE}, ?MODULE, IniFiles,  
[{timeout, 60000}]).

  stop() ->
      gen_server:cast(?MODULE, stop).

Cheers
Jan
--


Mime
View raw message