Skip to content

init_resources fails for non-root user #5070

@shevelevs

Description

@shevelevs

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.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions