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

Can you modify open files? #38

Closed
spuder opened this issue Mar 19, 2015 · 4 comments
Closed

Can you modify open files? #38

spuder opened this issue Mar 19, 2015 · 4 comments

Comments

@spuder
Copy link

spuder commented Mar 19, 2015

Can you modify the max number of open files with this cookbook?

The default is 1024

ulimit -n 2048
@bmhatfield
Copy link
Owner

Yes!

Check out https://github.com/bmhatfield/chef-ulimit#usage

Good luck!

@bmhatfield
Copy link
Owner

Resolved in the #chef IRC room.

@spuder
Copy link
Author

spuder commented Mar 19, 2015

I've tried the following


user_ulimit 'kafka' do
  rule do
    item :nofile
    type :hard
    value 10000
  end
  rule do
    item :nofile
    type :soft
    value 5000
  end
end

While it did create a file at /etc/security/limits.d/kafka_limits.conf, it is pretty much a blank file.

# Limits settings for kafka













~
~
~
~
~

https://gist.github.com/bmhatfield/99c8a1f4a71231d8449b

However I don't acutally need to use this cookbook, as pointed out in the IRC chanel, the kafka cookbook has build in support for modifying the ulimit

https://github.com/mthssdrbrg/kafka-cookbook/blob/master/templates/default/upstart/default.erb#L10-L12

@bmhatfield
Copy link
Owner

Hi,
You used the ulimit_domain syntax in the user_ulimit resource, which is why it isn't working :-)

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