O'Reilly logo

Salt Cookbook by Anirban Saha

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required