Gentoo Archives: gentoo-user

From: Mateusz Okulus <mmokulus@×××××.com>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] qbittorrent crashes after to many files open error
Date: Thu, 08 Sep 2022 17:21:34
Message-Id: 20220908171940.3vgteruwtka6mnie@archlinux
In Reply to: [gentoo-user] qbittorrent crashes after to many files open error by Dale
1 > root@fireball / # sysctl fs.file-max
2 > fs.file-max = 3289952
3 > root@fireball / # sysctl -w fs.file-max=32899520
4 > fs.file-max = 32899520
5 > root@fireball / # cat /proc/sys/fs/file-max
6 > 32899520
7
8 On my pc the limit is 2^63. But this is max files for kernel, which is
9 different for max files per user and max files per process.
10
11 For example if I run:
12
13 $ grep 'Limit\|open' /proc/$(pgrep qbittorrent | head -1)/limits
14 Limit Soft Limit Hard Limit Units
15 Max open files 524288 524288 files
16
17 524288 = 2^19
18
19 QBittorrent increases it's process limit to hard limit. With 10 TB of
20 torrents it's hard to tell if it's a bug or just 500k files is not
21 enough, I'd say it's probably the latter.
22
23 It seems you can change the default hard limit in
24 /etc/security/limits.conf
25
26 For example:
27
28 # 2^24, increased from 2^19
29 * hard nofile 16777216
30
31 Then after reloging:
32
33 $ grep 'Limit\|open' /proc/$(pgrep qbittorrent | head -1)/limits
34 Limit Soft Limit Hard Limit Units
35 Max open files 16777216 16777216 files
36
37 So this works, at least for me.
38
39 Check also limits.conf man page.
40
41 Regards,
42 mmokulus

Replies

Subject Author
Re: [gentoo-user] qbittorrent crashes after to many files open error Dale <rdalek1967@×××××.com>