Harold Johanssen
2023-03-17 12:40:40 UTC
I have a multithreaded C application in 15.0 that does indeed
open a lot of file descriptors, at some point dying with the diagnostic
mentioned in the subject line. The same application keeps running under
Ubuntu 20.04 without problems.
Checking out online, the suggestion is to increase the value of
/proc/sys/fs/file-max. Indeed, for 15.0 this is 1632376 by default,
whereas in the Ubuntu system it was set to 9223372036854775807. So I set
it to that value in 15.0 and restarted the application, to no avail:
after (many) hours running, I got the same issue.
Anybody know to overcome this problem? Like I said, the code is
exactly the same in both Ubuntu 20.04 and Slackware 15.0, and I have the
following settings:
Slackware 15.0:
# ulimit -n
1024
# ulimit -Hn
4096
# ulimit -Sn
1024
# cat /proc/sys/fs/file-max
9223372036854775807
Ubuntu 20.04:
# ulimit -n
1024
# ulimit -Hn
1048576
# ulimit -Sn
1024
# cat /proc/sys/fs/file-max
9223372036854775807
Is it just a matter of increasing the hard value under Slackware 15.0? I
haven't done so yet because I don't know how to do so without rebooting -
which, for a number of reasons, is not an option in the short term.
open a lot of file descriptors, at some point dying with the diagnostic
mentioned in the subject line. The same application keeps running under
Ubuntu 20.04 without problems.
Checking out online, the suggestion is to increase the value of
/proc/sys/fs/file-max. Indeed, for 15.0 this is 1632376 by default,
whereas in the Ubuntu system it was set to 9223372036854775807. So I set
it to that value in 15.0 and restarted the application, to no avail:
after (many) hours running, I got the same issue.
Anybody know to overcome this problem? Like I said, the code is
exactly the same in both Ubuntu 20.04 and Slackware 15.0, and I have the
following settings:
Slackware 15.0:
# ulimit -n
1024
# ulimit -Hn
4096
# ulimit -Sn
1024
# cat /proc/sys/fs/file-max
9223372036854775807
Ubuntu 20.04:
# ulimit -n
1024
# ulimit -Hn
1048576
# ulimit -Sn
1024
# cat /proc/sys/fs/file-max
9223372036854775807
Is it just a matter of increasing the hard value under Slackware 15.0? I
haven't done so yet because I don't know how to do so without rebooting -
which, for a number of reasons, is not an option in the short term.