Return-Path: Delivered-To: apmail-couchdb-user-archive@www.apache.org Received: (qmail 49166 invoked from network); 1 Dec 2010 18:29:35 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 1 Dec 2010 18:29:35 -0000 Received: (qmail 55250 invoked by uid 500); 1 Dec 2010 18:29:33 -0000 Delivered-To: apmail-couchdb-user-archive@couchdb.apache.org Received: (qmail 55079 invoked by uid 500); 1 Dec 2010 18:29:33 -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 55071 invoked by uid 99); 1 Dec 2010 18:29:33 -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 18:29:33 +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.216.180 as permitted sender) Received: from [209.85.216.180] (HELO mail-qy0-f180.google.com) (209.85.216.180) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 01 Dec 2010 18:29:29 +0000 Received: by qyk29 with SMTP id 29so7588780qyk.11 for ; Wed, 01 Dec 2010 10:29:06 -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=4vnWZh9hdSyrBsIQYHmnQGcSrfVxMmLQmmNJCZpe3a0=; b=E5H4WJjotEuTe/096t08r6eaHIppsO7n+4o/5GanXpPEqOAMEWB4MZSV8odKntkmTX YtmyjZ7z5FLRlJOlbJXEZ/ivVNCZ8CQ+/3OaR6KWheW/5meiP7I0CQ5Hv2lQeE39psJ/ MhGKj5Vs9+HATLZvphJtAeAj+2zMlwz6IDFQE= 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=qyhNESkxhCO/BGAKQXGufLFOqSwKNlRA4i0RLoYqT6QT6MA7goQlfpQj9Kjkz56cSZ BAhYoqEjTv48ow5xYu3xu+rp8xcFI2rqDph7JSZyk7/c4TvAOl3AMNjWFPWxoJgC/PFd rjTXLbxUlkrTqrsVkAbQetmL66TO292YEwvKU= MIME-Version: 1.0 Received: by 10.224.20.4 with SMTP id d4mr7995268qab.345.1291228146783; Wed, 01 Dec 2010 10:29:06 -0800 (PST) Received: by 10.220.176.137 with HTTP; Wed, 1 Dec 2010 10:29:06 -0800 (PST) In-Reply-To: References: Date: Wed, 1 Dec 2010 18:29:06 +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 look in /proc/&1 export HOME=3D ulimit -n 10000 exec chpst -u couchdb -f B. On Wed, Dec 1, 2010 at 6:21 PM, Jonathan Johnson wrote: > 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_failed}= }}}} > > [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,['Argument_= _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_su= p,<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_failed}= }}}} > > 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 >