Skip to content

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

Closed

Description

@gregs007

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?

Activity

  1. added this to the Short-term milestone on May 17, 2017
  2. geekgonecrazy commented on May 17, 2017

    @geekgonecrazy
    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.

  3. gregs007 commented on May 17, 2017

    @gregs007
    Author

    Thank you!

  4. mohag commented on Oct 8, 2018

    @mohag

    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>
    
  5. pixsysedp commented on Nov 21, 2018

    @pixsysedp

    Your solution work fine! tnx

  6. geekgonecrazy commented on Nov 27, 2018

    @geekgonecrazy
    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

  7. mohag commented on Dec 3, 2018

    @mohag

    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...

  8. geekgonecrazy commented on Dec 3, 2018

    @geekgonecrazy
    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.

  9. marceloschmidt commented on Jan 3, 2019

    @marceloschmidt
    Member

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

  10. geekgonecrazy commented on Jan 4, 2019

    @geekgonecrazy
    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

  11. added
    planned
    and removed on Jan 4, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

planned

Type

No type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions