From 5b9b9823e091b6e8720d3930785f59c424239daa Mon Sep 17 00:00:00 2001 From: John Christopher Anderson Date: Fri, 6 Mar 2009 18:20:09 +0000 Subject: configure view and external server timeout in using ini variables. closes COUCHDB-246 git-svn-id: https://svn.apache.org/repos/asf/couchdb/trunk@751020 13f79535-47bb-0310-9956-ffa450edef68 --- etc/couchdb/default.ini.tpl.in | 2 +- src/couchdb/couch_os_process.erl | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/etc/couchdb/default.ini.tpl.in b/etc/couchdb/default.ini.tpl.in index 0a5dd0a2..8deca3cf 100644 --- a/etc/couchdb/default.ini.tpl.in +++ b/etc/couchdb/default.ini.tpl.in @@ -8,7 +8,7 @@ view_index_dir = %localstatelibdir% util_driver_dir = %couchprivlibdir% max_document_size = 4294967296 ; 4 GB max_attachment_chunk_size = 4294967296 ; 4GB -view_timeout = 5000 ; 5 seconds +os_process_timeout = 5000 ; 5 seconds. for view and external servers. max_dbs_open = 100 [httpd] diff --git a/src/couchdb/couch_os_process.erl b/src/couchdb/couch_os_process.erl index 63cc07b0..a6c7ef25 100644 --- a/src/couchdb/couch_os_process.erl +++ b/src/couchdb/couch_os_process.erl @@ -99,12 +99,14 @@ readjson(OsProc) when is_record(OsProc, os_proc) -> % gen_server API init([Command, Options, PortOptions]) -> + BaseTimeOut = list_to_integer(couch_config:get( + "couchdb", "os_process_timeout", "5000")), BaseProc = #os_proc{ command=Command, port=open_port({spawn, Command}, PortOptions), writer=fun writejson/2, reader=fun readjson/1, - timeout=5000 + timeout=BaseTimeOut }, OsProc = lists:foldl(fun(Opt, Proc) -> -- cgit v1.2.3