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

Raise open files limit back to ubuntu v20 values #143

Merged

Conversation

boesing
Copy link
Member

@boesing boesing commented Dec 16, 2022

Q A
QA yes

Description

With the introduction of Ubuntu v22, the maximum number of open file descriptors were lowered for non-root users from 1048576 to 1024.

This will restore the old value of 1048576 which might fix some broken CI runs in the laminas-cache-storage-adapter-* repositories, etc.

Signed-off-by: Maximilian Bösing <2189546+boesing@users.noreply.github.com>
@boesing boesing added this to the 1.32.0 milestone Dec 16, 2022
The docker build on GHA led to an error that `unlimited` is not a number. Actually, the `ulimit -n` command should not return `unlimited` but `1048576` as that is what is configured in `/etc/security/limits.d/testuser.conf`.

However, for the initial release, we should just trust the container.

Signed-off-by: Maximilian Bösing <2189546+boesing@users.noreply.github.com>
Copy link
Member

@internalsystemerror internalsystemerror left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Checks are green, I say let's give a go.

Dockerfile Show resolved Hide resolved
@boesing boesing merged commit aaf728e into laminas:1.32.x Dec 16, 2022
@boesing boesing deleted the feature/raise-open-files-limit-testuser branch December 16, 2022 20:03
Copy link

@ghostwriter ghostwriter left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

systemd ignores the values from the /etc/security/limits.conf//etc/security/limits.d/*.

To configure a system-wide limit:

  • add DefaultLimitNOFILE=1048576 to /etc/systemd/system.conf file
  • add fs.file-max=1048576 to /etc/sysctl.conf file

1048576 is an arbitrary value.

@boesing
Copy link
Member Author

boesing commented Dec 16, 2022

Thanks! Feel free to provide a patch for this, as of now, this change fixed all of my problems at once and thus I have no further needs for this. But if you can think about problems which might be solved with adding the other settings, I'm happy to merge patches. 👍🏼

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

Successfully merging this pull request may close these issues.

3 participants