Book Image

Salt Cookbook

By : Anirban Saha
Book Image

Salt Cookbook

By: Anirban Saha

Overview of this book

Table of Contents (18 chapters)
Salt Cookbook
Credits
About the Author
About the Reviewer
www.PacktPub.com
Preface
Index

Dealing with too many open files


In this recipe, you will learn how to resolve a situation where the number of open files exceeds the maximum file limit set in the operating system.

How to do it...

  1. On trying to add a new minion to the master, the following error may be noticed in the log:

    [salt.master    ][INFO    ] Starting Salt worker process 38
    Too many open files
    sock != -1 (tcp_listener.cpp:335)
    
  2. Check the limit of maximum open files in the system:

    [root@salt-master ~]# ulimit -n
    1024
    
  3. Run the salt-master daemon in debug mode:

    [root@salt-master ~]# salt-master -l debug
    .
    .
    [INFO    ] salt-master is starting as user 'root'
    [INFO    ] Current values for max open files soft/hard setting: 1024/4096
    [INFO    ] The value for the 'max_open_files' setting, 100000, is higher than what the user running salt is allowed to raise to, 4096. Defaulting to 4096.
    [INFO    ] Raising max open files value to 4096
    [INFO    ] New values for max open files soft/hard values: 4096/4096
    
  4. Edit the /etc/security/limits...