From dev-return-13851-apmail-couchdb-dev-archive=couchdb.apache.org@couchdb.apache.org Mon Dec 20 21:09:24 2010 Return-Path: Delivered-To: apmail-couchdb-dev-archive@www.apache.org Received: (qmail 13405 invoked from network); 20 Dec 2010 21:09:23 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 20 Dec 2010 21:09:23 -0000 Received: (qmail 90147 invoked by uid 500); 20 Dec 2010 21:09:23 -0000 Delivered-To: apmail-couchdb-dev-archive@couchdb.apache.org Received: (qmail 89867 invoked by uid 500); 20 Dec 2010 21:09:22 -0000 Mailing-List: contact dev-help@couchdb.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@couchdb.apache.org Delivered-To: mailing list dev@couchdb.apache.org Received: (qmail 89852 invoked by uid 99); 20 Dec 2010 21:09:22 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 20 Dec 2010 21:09:22 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.22] (HELO thor.apache.org) (140.211.11.22) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 20 Dec 2010 21:09:21 +0000 Received: from thor (localhost [127.0.0.1]) by thor.apache.org (8.13.8+Sun/8.13.8) with ESMTP id oBKL91co003900 for ; Mon, 20 Dec 2010 21:09:01 GMT Message-ID: <21786987.223281292879341638.JavaMail.jira@thor> Date: Mon, 20 Dec 2010 16:09:01 -0500 (EST) From: "Paul Mietz Egli (JIRA)" To: dev@couchdb.apache.org Subject: [jira] Updated: (COUCHDB-991) Native query server show function does not respect os_process_timeout setting In-Reply-To: <252636.223261292879341332.JavaMail.jira@thor> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/COUCHDB-991?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Paul Mietz Egli updated COUCHDB-991: ------------------------------------ Description: I have a design document containing show functions written in Erlang for performance reasons, and I found that some calls to these shows were timing out after about eight seconds (according to curl). I increased os_process_timeout to 300000 but still saw the show timing out after seven or eight seconds. Log shows: {exit, {timeout, {gen_server,call, [<0.135.0>,{prompt,[my data]}]}}} I asked about this problem in IRC, and kocolosk said that the problem is that couch_native_process only checks the timeout for a couple of commands, like list_row. The gen_server:call/2 function is timing out because ddoc(...<<"show">>) is taking more than five seconds to process. Changing line 63 to the following prevents the timeout: gen_server:call(Pid, {prompt, Data}, infinity) Ideally, though, each run/2 call in couch_native_process would respect the configured timeout value. Workaround for now is to wrap the ddoc(..<<"shows">>..) call in a timer using State#evstate.timeout as a duration (thanks for the solution, kocolosk!). was: I have a design document containing show functions written in Erlang for performance reasons, and I found that some calls to these shows were timing out after about eight seconds (according to curl). I increased os_process_timeout to 300000 but still saw the show timing out after seven or eight seconds. Log shows: {code:none} {exit, {timeout, {gen_server,call, [<0.135.0>,{prompt,[my data]}]}}} {code} I asked about this problem in IRC, and kocolosk said that the problem is that couch_native_process only checks the timeout for a couple of commands, like list_row. The gen_server:call/2 function is timing out because ddoc(...<<"show">>) is taking more than five seconds to process. Changing line 63 to the following prevents the timeout: {code:none} gen_server:call(Pid, {prompt, Data}, infinity) {code} Ideally, though, each run/2 call in couch_native_process would respect the configured timeout value. Workaround for now is to wrap the ddoc(..<<"shows">>..) call in a timer using State#evstate.timeout as a duration (thanks for the solution, kocolosk!). > Native query server show function does not respect os_process_timeout setting > ----------------------------------------------------------------------------- > > Key: COUCHDB-991 > URL: https://issues.apache.org/jira/browse/COUCHDB-991 > Project: CouchDB > Issue Type: Bug > Components: Database Core > Affects Versions: 1.0.1 > Environment: Mac OSX 10.6; CouchDB/1.0.1 (Erlang OTP/R13B) > Reporter: Paul Mietz Egli > > I have a design document containing show functions written in Erlang for performance reasons, and I found that some calls to these shows were timing out after about eight seconds (according to curl). I increased os_process_timeout to 300000 but still saw the show timing out after seven or eight seconds. Log shows: > {exit, {timeout, {gen_server,call, [<0.135.0>,{prompt,[my data]}]}}} > I asked about this problem in IRC, and kocolosk said that the problem is that couch_native_process only checks the timeout for a couple of commands, like list_row. The gen_server:call/2 function is timing out because ddoc(...<<"show">>) is taking more than five seconds to process. Changing line 63 to the following prevents the timeout: > gen_server:call(Pid, {prompt, Data}, infinity) > Ideally, though, each run/2 call in couch_native_process would respect the configured timeout value. Workaround for now is to wrap the ddoc(..<<"shows">>..) call in a timer using State#evstate.timeout as a duration (thanks for the solution, kocolosk!). -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.