Skip to content
This repository has been archived by the owner on Oct 30, 2018. It is now read-only.

Used space query keeps 1028 files open #46

Closed
littleskunk opened this issue Feb 24, 2017 · 2 comments · Fixed by #47
Closed

Used space query keeps 1028 files open #46

littleskunk opened this issue Feb 24, 2017 · 2 comments · Fixed by #47
Assignees
Labels

Comments

@littleskunk
Copy link
Contributor

littleskunk commented Feb 24, 2017

Package Versions

└─┬ storjshare-daemon@2.4.3
  └─┬ storj-lib@6.2.0
    └── kfs@3.1.1

Replace the values below using the output from node --version.

v6.10.0

Expected Behavior

kfs contains 257 leveldb and each leveldb needs at least 4 open files. LOG, LOCK, MANIFEST and one *.log file. I would expect that only the used leveldbs are open.

Actual Behavior

Because of the used space query all leveldbs and all 1028 files are open and never closed.

root@storj:~# ls -l /proc/416/fd | grep 'storjshare' | wc -l
1028

I disabled the used space query: https://github.com/littleskunk/core/blob/debug/lib/storage/adapters/embedded.js#L171-L173

root@storj:~# ls -l /proc/416/fd | grep 'storjshare' | wc -l
4
@littleskunk
Copy link
Contributor Author

Leveldbs are never closed. Even hours after the first download channel is timed out (was never used) the leveldb is still open.

root@storj:~# grep 'download\|upload' .storjshare/storjshare/logs/188071ba7cfd974a9e47b59e24b0737ebf845db3.log
{"level":"info","message":"authorizing download data channel for 144d1265baf0908fe6c6bd272c701aac7811e3e4","timestamp":"2017-02-24T10:58:45.947Z"}
{"level":"info","message":"authorizing download data channel for 1e85d472e5e88a37d9bd9f3780891d8e532d4832","timestamp":"2017-02-24T11:17:34.940Z"}
{"level":"info","message":"authorizing download data channel for 1919783206b265ed681868ebc024777d083e9d93","timestamp":"2017-02-24T11:21:10.332Z"}
{"level":"info","message":"authorizing download data channel for 17cbc6773e573b28489412753447e4e9fe16b76b","timestamp":"2017-02-24T12:02:56.419Z"}
{"level":"info","message":"authorizing download data channel for 1e85d472e5e88a37d9bd9f3780891d8e532d4832","timestamp":"2017-02-24T12:32:03.750Z"}
{"level":"info","message":"authorizing download data channel for 1919783206b265ed681868ebc024777d083e9d93","timestamp":"2017-02-24T13:14:13.817Z"}
{"level":"info","message":"authorizing download data channel for 17cbc6773e573b28489412753447e4e9fe16b76b","timestamp":"2017-02-24T13:15:26.548Z"}
root@storj:~# ls -l /proc/416/fd | grep 'storjshare' | wc -l
32

@44203 44203 added the bug label Feb 27, 2017
@44203 44203 mentioned this issue Feb 27, 2017
@44203 44203 self-assigned this Feb 27, 2017
@44203
Copy link
Contributor

44203 commented Feb 27, 2017

#47

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants