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

nexus.service Should Set Max File Descriptors #3

Open
coofercat opened this issue Jul 10, 2019 · 1 comment
Open

nexus.service Should Set Max File Descriptors #3

coofercat opened this issue Jul 10, 2019 · 1 comment

Comments

@coofercat
Copy link

According to [1], Nexus server needs an increase over the default number of file descriptors (default = 4096, it needs 65536). To do this, the nexus.service systemd unit needs to include an additional line:

[Unit]
Description=nexus service
After=network.target

[Service]
Type=forking
LimitNOFILE=65536
ExecStart=/opt/nexus/bin/nexus start
ExecStop=/opt/nexus/bin/nexus stop
User=nexus
Restart=on-abort

[Install]
WantedBy=multi-user.target

(note LimitNOFILE=65536)

I note that the nexus.service in this project has different ExecStart and ExecStop lines than the example above from the documentation. I don't see any need to change those, although it may be as well if you're so inclined (one less bit of scripting to follow around the system!).

In non-systemd setups, there's a change required in limits.conf, but as all my systems are systemd, I can't test that.

[1] https://support.sonatype.com/hc/en-us/articles/213465218-The-nexus-log-file-is-full-of-too-many-open-files-exceptions-how-can-I-fix-this-?_ga=2.131632015.1841895854.1562745975-1778912651.1562745975

@jlyheden
Copy link
Contributor

Hi, thanks for the feedback, we are no longer using Nexus and Puppet and due to this have not kept up to date with deployment best practices from Sonatype, but are happy to accept pull requests that would be beneficial for you and the community.

Setting file descriptor limit only when running systemd is fine as long as the caveat is mentioned in the readme imho - if someone else from the community is running Nexus under sysv he or she is free to contribute the necessary limits.conf change.

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

No branches or pull requests

2 participants