Return-Path: Delivered-To: apmail-couchdb-user-archive@www.apache.org Received: (qmail 86270 invoked from network); 1 Dec 2010 20:00:42 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 1 Dec 2010 20:00:42 -0000 Received: (qmail 14325 invoked by uid 500); 1 Dec 2010 20:00:38 -0000 Delivered-To: apmail-couchdb-user-archive@couchdb.apache.org Received: (qmail 14263 invoked by uid 500); 1 Dec 2010 20:00:37 -0000 Mailing-List: contact user-help@couchdb.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@couchdb.apache.org Delivered-To: mailing list user@couchdb.apache.org Received: (qmail 14255 invoked by uid 99); 1 Dec 2010 20:00:37 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 01 Dec 2010 20:00:37 +0000 X-ASF-Spam-Status: No, hits=-0.7 required=10.0 tests=FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,SPF_PASS,T_TO_NO_BRKTS_FREEMAIL X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of robert.newson@gmail.com designates 209.85.212.52 as permitted sender) Received: from [209.85.212.52] (HELO mail-vw0-f52.google.com) (209.85.212.52) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 01 Dec 2010 20:00:33 +0000 Received: by vws13 with SMTP id 13so2837721vws.11 for ; Wed, 01 Dec 2010 12:00:12 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:received:in-reply-to :references:date:message-id:subject:from:to:content-type :content-transfer-encoding; bh=KTMIf5zFjOlkn2381YzrWTGMD3AqkHA8TpJ8V75rkcY=; b=Gl1sW+sNlLzTiGymm96nPWGz9ZyZk4dEmsM/SU7gZWi+TMQjcSLACCeISVc1BEOGQz dGTKtUAFu+vbpzeibeguRcO8I6C6ZJEb0+PUelx5D+dS9X5CYn2ydtOpNW6jBg0Bh2de XmsNitD3o7EJ/56BuliePXzS8AGf9kDbUUUzo= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type:content-transfer-encoding; b=qPtk7RYnMIL1gYB6wqITC8E/RY7Her9fzAs9mjZE6HF1feAJXjUz1Wib8Ltta9fuU0 6AwambREXlh3n1Qp3ALsxMGgPFFJ6v+JfcuJiVDNt30mwN5399/OKuK7u6jKBqL6a8rD /JiKQOCgUHXAzeTykvlN0Uu4xz17yxywhRgMM= MIME-Version: 1.0 Received: by 10.229.82.10 with SMTP id z10mr1450179qck.98.1291233611903; Wed, 01 Dec 2010 12:00:11 -0800 (PST) Received: by 10.220.176.137 with HTTP; Wed, 1 Dec 2010 12:00:11 -0800 (PST) In-Reply-To: References: Date: Wed, 1 Dec 2010 20:00:11 +0000 Message-ID: Subject: Re: Too many open files From: Robert Newson To: user@couchdb.apache.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable You aren't launching couchdb with anything that supports PAM. look in /etc/pam.d for a list of services that will honor limits.conf. On my system (Debian), /etc/pam.d/su does not honor limits.conf by default. Even if you enable it, the couchdb startup script doesn't use su anyway, so it still doesn't help. shorter version: PAM and limits.conf is for interactive users, not daemons. B. On Wed, Dec 1, 2010 at 7:55 PM, Jonathan Johnson wrote: > Ah, you're absolutely right -- it didn't work. I'm still at 1024 > files. Well, that answers part of the question. If all else fails, I > could use your method by updating the init.d script a little. > > Does anyone have any ideas as to why the limits.conf doesn't work? I > know my way around setting up a system, but this level of > configuration is currently a little above my head :) > > -Jon > > > On Wed, Dec 1, 2010 at 12:29 PM, Robert Newson = wrote: >> look in /proc/> doubt it does. >> >> The way I increase fd limits from the miserly Linux default of 1024 is >> with this run script, where couchdb is launched by runit; >> >> #!/bin/bash >> exec 2>&1 >> export HOME=3D >> ulimit -n 10000 >> exec chpst -u couchdb -f >> >> B. >> >> >> >> >> On Wed, Dec 1, 2010 at 6:21 PM, Jonathan Johnson wro= te: >>> Our couch setup has around 100 databases with a significant number of >>> views in each database. Every once in a while, couch takes a dive. I >>> happened to be around this time, and saw this in the logs: >>> >>> >>> [Wed, 01 Dec 2010 18:09:19 GMT] [error] [<0.102.0>] {error_report,<0.31= .0>, >>> =A0 =A0{<0.102.0>,std_error, >>> =A0 =A0 {mochiweb_socket_server,225,{acceptor_error,{error,accept_faile= d}}}}} >>> >>> [Wed, 01 Dec 2010 18:09:19 GMT] [error] [<0.10711.1125>] {error_report,= <0.31.0>, >>> =A0 =A0 =A0 =A0 =A0 =A0 =A0{<0.10711.1125>,std_error, >>> =A0 =A0 =A0 =A0 =A0 =A0 =A0 [{application,mochiweb}, >>> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0"Accept failed error","{error,emfile}"]}= } >>> >>> [Wed, 01 Dec 2010 18:09:19 GMT] [error] [<0.10711.1125>] {error_report,= <0.31.0>, >>> =A0 =A0{<0.10711.1125>,crash_report, >>> =A0 =A0 [[{initial_call,{mochiweb_socket_server,acceptor_loop,['Argumen= t__1']}}, >>> =A0 =A0 =A0 {pid,<0.10711.1125>}, >>> =A0 =A0 =A0 {registered_name,[]}, >>> =A0 =A0 =A0 {error_info, >>> =A0 =A0 =A0 =A0 =A0 {exit, >>> =A0 =A0 =A0 =A0 =A0 =A0 =A0 {error,accept_failed}, >>> =A0 =A0 =A0 =A0 =A0 =A0 =A0 [{mochiweb_socket_server,acceptor_loop,1}, >>> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0{proc_lib,init_p_do_apply,3}]}}, >>> =A0 =A0 =A0 {ancestors, >>> =A0 =A0 =A0 =A0 =A0 [couch_httpd,couch_secondary_services,couch_server_= sup,<0.32.0>]}, >>> =A0 =A0 =A0 {messages,[]}, >>> =A0 =A0 =A0 {links,[<0.102.0>]}, >>> =A0 =A0 =A0 {dictionary,[]}, >>> =A0 =A0 =A0 {trap_exit,false}, >>> =A0 =A0 =A0 {status,running}, >>> =A0 =A0 =A0 {heap_size,233}, >>> =A0 =A0 =A0 {stack_size,24}, >>> =A0 =A0 =A0 {reductions,202}], >>> =A0 =A0 =A0[]]}} >>> >>> [Wed, 01 Dec 2010 18:09:19 GMT] [error] [<0.102.0>] {error_report,<0.31= .0>, >>> =A0 =A0{<0.102.0>,std_error, >>> =A0 =A0 {mochiweb_socket_server,225,{acceptor_error,{error,accept_faile= d}}}}} >>> >>> I had run into an open files limit before, and had adjusted a few >>> settings. Here are some of the config values I think are relevant: >>> >>> max_dbs_open =3D 100 >>> max_connections =3D 2048 >>> >>> From /etc/security/limits.conf >>> couchdb =A0 =A0 =A0 =A0 hard =A0 =A0nofile =A04096 >>> couchdb =A0 =A0 =A0 =A0 soft =A0 =A0nofile =A04096 >>> >>> The installed version is 1.0.1. >>> >>> I'm not sure how to debug this issue further. It only happens after >>> several days of usage, and once it happens, I can't even ask for the >>> stats page to see what the current numbers are :) >>> >>> Thanks in advance for any help! >>> -Jon >>> >> >