New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

LimitNOFILE=ininity defaults to 65535 #6559

Closed
zuzzas opened this Issue Aug 7, 2017 · 7 comments

Comments

5 participants
@zuzzas

zuzzas commented Aug 7, 2017

Submission type

Bug report

systemd version the issue has been seen with

systemd 234

Used distribution

Debian Sid

In case of bug report: Expected behaviour you didn't see

LimitNOFILE=ininity sets maximum FD's to 65535. Shouldn't it be equal to fs.file_max and/or fs.nr_open?

In case of bug report: Unexpected behaviour you saw

LimitNOFILE=ininity sets maximum FD's to 65535.

In case of bug report: Steps to reproduce the problem

Create any Unit file with LimitNOFILE=infinity option in [Service] group.

@zuzzas

This comment has been minimized.

zuzzas commented Aug 8, 2017

Of course, I've misspelled 'infinity' and mindlessly copy-pasted it everywhere. My apologies!

@evverx

This comment has been minimized.

Member

evverx commented Aug 8, 2017

systemd has been reading nr_open since 6385cb3 was merged, so assigning infinity to LimitNOFILE when nr_open is equal to 123456 generally leads to the following:

3130  setrlimit(RLIMIT_NOFILE, {rlim_cur=RLIM64_INFINITY, rlim_max=RLIM64_INFINITY}) = -1 EPERM (Operation not permitted)
3130  getrlimit(RLIMIT_NOFILE, {rlim_cur=123456, rlim_max=123456}) = 0
3130  setrlimit(RLIMIT_NOFILE, {rlim_cur=123456, rlim_max=123456}) = 0

. It seems that the issue can be closed. Or is there anything else that I might have missed?

@zuzzas

This comment has been minimized.

zuzzas commented Aug 8, 2017

Thank you!
I'll investigate, perhaps, my test case is flawed.

@zuzzas zuzzas closed this Aug 8, 2017

@poettering

This comment has been minimized.

Member

poettering commented Aug 8, 2017

Yupp, it appears 6385cb3 fixed this, which is part of v234. @zuzzas please upgrade!

@HOSTED-POWER

This comment has been minimized.

HOSTED-POWER commented Feb 3, 2018

We have the issue on CentOS 7 atm. When we set LimitNOFILE=infinity we can't open more than 65535 files. We set manually to a very high value and that worked.

But could we conclude that newer systemd version will not suffer from this since the change?

@konstruktoid

This comment has been minimized.

konstruktoid commented Nov 4, 2018

Verified with systemd-219-62.el7.x86_64 on Red Hat Enterprise Linux Server release 7.6 (Maipo).

What version does CentOS 7 use @HOSTED-POWER?

@HOSTED-POWER

This comment has been minimized.

HOSTED-POWER commented Nov 4, 2018

Hmm not sure anymore, must have been latest at the time of testing since we update always very quickly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment