When working with Sauce Connect Proxy, you may get a warning message at start up to increase the file limit size to at least 8000.
*** WARNING: open file limit 1024 is too low!
Sauce Labs recommends setting it to at least 8000.
Modern systems allow much higher limits without any visible impact on memory, so we recommend setting the open file limit to 64000 in order to ensure the open file limit is never an issue for tunneled requests.
If you do not do this, you may find that over time, Sauce Connect Proxy does not operate correctly, due to a lack of available file handles. You might see problems establishing connections in the Sauce Labs logfile, and messages such as:
[30070] PROXY error 24 (Too many open files) on listener
For Linux or Mac systems, one way to set the open file limit for Sauce Connect Proxy is:
This setting will be removed when you close the Terminal or open a new terminal session.
- Gain Sudo rights.
- Run the command:
ulimit -n 64000
You should enter at least 64000 here, as that's our recommendation, but feel free to increase past this number if your system can handle it. - Verify the change worked by running
ulimit -n
- Restart Sauce Connect Proxy
Permanently Modifying Profile Settings:
To set this permanently for the user which runs Sauce Connect Proxy, edit that user's .bash.profile or .profile file and add the command ulimit -n 64000 there.
- Add the ulimit command to your .bash_profile or .bashrc-type file:
ulimit -n 64000
You should enter at least 64000 here, as that's our minimum recommendation, but feel free to increase past this number if your system can handle it. - Run
source ~/.bash_profile
(or .bashrc or whatever profile you're using) - Verify the change worked by running
ulimit -n
- Restart Sauce Connect Proxy