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

How to increase file descriptors in Caddy service within Snap? #6979

Open
gregs007 opened this issue May 15, 2017 · 9 comments
Open

How to increase file descriptors in Caddy service within Snap? #6979

gregs007 opened this issue May 15, 2017 · 9 comments
Assignees
Labels
Milestone

Comments

@gregs007
Copy link

Rocket.Chat Version: 0.55.1
Running Instances: 1
DB Replicaset OpLog: Enabled
Node Version: v4.8.0

On startup of caddy service I get:

WARNING: File descriptor limit 1024 is too low for production servers. At least 8192 is recommended. Fix with "ulimit -n 8192

I can modify /etc/systemd/system/snap.rocketchat-server.rocketchat-caddy.service with LimitNOFILE=8192 but I'm assuming that's not recommended.

Can someone please advise what the proper way to increase file descriptors is within the snap?

@geekgonecrazy
Copy link
Contributor

Currently not possible to make persist between updates. You found the solution I would have suggested for short term.

However I don't think this warning is critical with just rocket.chat behind caddy.

I've added it to the short term roadmap to get this addressed though.

@gregs007
Copy link
Author

Thank you!

@mohag
Copy link

mohag commented Oct 8, 2018

You should be able to do this:

# mkdir /etc/systemd/system/snap.rocketchat-server.rocketchat-caddy.service.d
# echo -e "[Service]\nLimitNOFILE=8192 " > /etc/systemd/system/snap.rocketchat-server.rocketchat-caddy.service.d/limits.conf
# snap restart <whatever the snap service is called>

@pixsysedp
Copy link

Your solution work fine! tnx

@geekgonecrazy
Copy link
Contributor

Beware that doing this might go away with snap updates. As I know snap does generate the unit file. Maybe it doesn’t touch the folder but beware just in case

@mohag
Copy link

mohag commented Dec 3, 2018

Beware that doing this might go away with snap updates. As I know snap does generate the unit file. Maybe it doesn’t touch the folder but beware just in case

This seems to be the relevant code (also see around line 394). It does not seem to touch the directories...

@geekgonecrazy
Copy link
Contributor

👍 agreed! Looks like a good workaround that isn’t currently in risk of overwrite. They might change it in the future though. So would still recommend to beware.

@marceloschmidt
Copy link
Member

@geekgonecrazy @LuluGO has this been fixed by #12351 ? or is this still relevant?

@marceloschmidt marceloschmidt added type: discussion and removed Feature: Request Requested Feature labels Jan 3, 2019
@geekgonecrazy
Copy link
Contributor

Still relevant. We added support to set environment variables for Rocket.chat primarily as well as a few config things in that PR.

So this is still something we need to look at

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

No branches or pull requests

6 participants