Gentoo Archives: gentoo-user

From: mad.scientist.at.large@××××××××.com
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] qbittorrent crashes after to many files open error
Date: Thu, 08 Sep 2022 23:17:16
Message-Id: NBUO8Af--3-2@tutanota.com
In Reply to: Re: [gentoo-user] qbittorrent crashes after to many files open error by Dale
1 I'd suggest looking at the "advanced" section of the preferences.  Lots of way to limit/expand memory use etc.  You really should also check all the other Qbit preferences, there are a lot.  For example you can limit number of I/O threads, block multiple connections from the same host (this prevents some known abuses related to your' client.
2
3 --"Fascism begins the moment a ruling class, fearing the people may use their political democracy to gain economic democracy, begins to destroy political democracy in order to retain its power of exploitation and special privilege." Tommy Douglas
4
5
6
7
8 Sep 8, 2022, 16:24 by rdalek1967@×××××.com:
9
10 > Mateusz Okulus wrote:
11 >
12 >>> root@fireball / # sysctl fs.file-max
13 >>> fs.file-max = 3289952
14 >>> root@fireball / # sysctl -w fs.file-max=32899520
15 >>> fs.file-max = 32899520
16 >>> root@fireball / # cat /proc/sys/fs/file-max
17 >>> 32899520
18 >>>
19 >> On my pc the limit is 2^63. But this is max files for kernel, which is
20 >> different for max files per user and max files per process.
21 >>
22 >> For example if I run:
23 >>
24 >> $ grep 'Limit\|open' /proc/$(pgrep qbittorrent | head -1)/limits
25 >> Limit Soft Limit Hard Limit Units
26 >> Max open files 524288 524288 files
27 >>
28 >> 524288 = 2^19
29 >>
30 >> QBittorrent increases it's process limit to hard limit. With 10 TB of
31 >> torrents it's hard to tell if it's a bug or just 500k files is not
32 >> enough, I'd say it's probably the latter.
33 >>
34 >> It seems you can change the default hard limit in
35 >> /etc/security/limits.conf
36 >>
37 >> For example:
38 >>
39 >> # 2^24, increased from 2^19
40 >> * hard nofile 16777216
41 >>
42 >> Then after reloging:
43 >>
44 >> $ grep 'Limit\|open' /proc/$(pgrep qbittorrent | head -1)/limits
45 >> Limit Soft Limit Hard Limit Units
46 >> Max open files 16777216 16777216 files
47 >>
48 >> So this works, at least for me.
49 >>
50 >> Check also limits.conf man page.
51 >>
52 >> Regards,
53 >> mmokulus
54 >>
55 >> .
56 >>
57 >
58 >
59 > It appears the change I made wasn't what was needed.  I took a nap,
60 > after doing today what I used to do on Friday, which involves going to
61 > Doctor, getting shots, then shopping around town etc etc.  Anyway, I
62 > woke up to Qbittorrent being gone.  It crashed at some point.  In the
63 > notification thingy, it had a few of the file open errors again.  So, I
64 > ran some of the commands you posted, my hard limit was set to 4096.  I
65 > whipped out my calculator and doubled it.  I set it in the limits.conf
66 > file like so: 
67 >
68 > root@fireball / # cat /etc/security/limits.conf | grep nofile
69 > #        - nofile - max number of open file descriptors
70 > *               hard    nofile          8192
71 > root@fireball / #
72 >
73 >
74 > I logged out and back in.  I ran the command you shared and it was
75 > indeed set to the new amount.  I'm going to upgrade qbittorrent to the
76 > new version again and test it some more. 
77 >
78 > Thanks much for the help.  Maybe this will fix it.
79 >
80 > Dale
81 >
82 > :-)  :-) 
83 >

Replies

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