couchdb-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Filipe David Manana <>
Subject Re: CouchDb not releasing files
Date Sat, 25 Sep 2010 15:54:31 GMT
couch_file gen_server will eventually be shutdown through the
reference counter pointed to by the the #db{} record.

Key places to look at:



And yes, terminate is always called, except for exceptional cases like
the one Paul mentioned.

On Sat, Sep 25, 2010 at 4:47 PM, Robert Dionne
<> wrote:
> On Sep 25, 2010, at 11:15 AM, Randall Leeds wrote:
>> On Sat, Sep 25, 2010 at 17:07, Robert Dionne
>> <> wrote:
>>> couch_file has a close function which presumably does the right thing, but it's
only called from couch_db_update:terminate
>> It just shuts down the process.
> right, I'm just wondering how couch_db_update:terminate is ever called? Does it receive
an EXIT message?
>> The question on the table is whether
>> that will close the raw file opened by the process as well. Stephen,
>> can you reproduce the issue with .couch files if you set max_open_dbs
>> really low (like 2) and repeatedly access three or four databases? If
>> not, then I suspect it's a ref counting issue with the view index and
>> not directly related to couch_file at all.
>> -Randall

Filipe David Manana,,

"Reasonable men adapt themselves to the world.
 Unreasonable men adapt the world to themselves.
 That's why all progress depends on unreasonable men."

View raw message