couchdb-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Norman Barker (JIRA)" <j...@apache.org>
Subject [jira] [Created] (COUCHDB-1114) timeout in couch_os_process not using configuration
Date Thu, 31 Mar 2011 16:17:05 GMT
timeout in couch_os_process not using configuration
---------------------------------------------------

                 Key: COUCHDB-1114
                 URL: https://issues.apache.org/jira/browse/COUCHDB-1114
             Project: CouchDB
          Issue Type: Bug
          Components: Database Core
    Affects Versions: 1.0.2
         Environment: rhel5 and windows
            Reporter: Norman Barker


I started testing couchdb when the system was under load from other
processes, basically I wanted to check that couchdb would still work
(this is a real application, not just testing) and couchdb made a few
groans that I have listed below

in

https://svn.apache.org/repos/asf/couchdb/trunk/src/couchdb/couch_os_process.erl

in the init function, BaseProc record doesn't include the timeout
configured in the ini file, this was a simple fix

   Timeout = list_to_integer(couch_config:get(
                           "couchdb", "os_process_timeout", "5000")),
   BaseProc = #os_proc{
       command=Command,
       port=open_port({spawn, Spawnkiller ++ " " ++ Command}, PortOptions),
       writer=fun writejson/2,
       reader=fun readjson/1,
       timeout=Timeout
   },

and then in any gen_server call, the timeout isn't set to infinity, in
particular in couch_query_servers

ret_os_process(Proc) ->
   true = gen_server:call(couch_query_servers, {ret_proc, Proc}, infinity),
   catch unlink(Proc#proc.pid),
   ok.

is there any reason not to make gen_server:call with an infinity timeout?

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

Mime
View raw message