Skip to content
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

init_resources fails for non-root user #5070

Closed
shevelevs opened this issue Nov 20, 2019 · 3 comments
Closed

init_resources fails for non-root user #5070

shevelevs opened this issue Nov 20, 2019 · 3 comments

Comments

@shevelevs
Copy link

shevelevs commented Nov 20, 2019

When running as non-privileged user, we get an error

...
File "/.../lib/python3.5/site-packages/notebook/notebookapp.py", line 1420, in init_resources
resource.setrlimit(resource.RLIMIT_NOFILE, (soft, hard))
ValueError: not allowed to raise maximum limit

I think this is how setrlimit behaves according to the doc (https://docs.python.org/3/library/resource.html) when process is trying to change hard limit as a non-root user.

I think the reasonable behavior would be not to fail unless the config was explicitly specified and is above the default limits for the effective user.

@shevelevs
Copy link
Author

Related PR: #4893

@takluyver
Copy link
Member

Yes, that sounds reasonable. Do you want to make a PR?

It should probably still warn in that case (as the configured minimum must be higher than the hard limit), and maybe still raise the soft limit to the hard limit if they differ.

shevelevs pushed a commit to shevelevs/notebook that referenced this issue Nov 22, 2019
ulimit values so trying to increase them above hard limit while
running as non-privileged user is not causing error on start-up.

See jupyter#5070
shevelevs pushed a commit to shevelevs/notebook that referenced this issue Nov 22, 2019
ulimit values so trying to increase them above hard limit while
running as non-privileged user is not causing error on start-up.

See jupyter#5070
@takluyver
Copy link
Member

Closed by #5075.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 29, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants