This is an automated email from the ASF dual-hosted git repository. tvb pushed a commit to branch nanonyme/warn-nofile in repository https://gitbox.apache.org/repos/asf/buildstream.git
commit 80b7bb5a4596367570afa4b1d61178abcad8ec72 Author: Seppo Yli-Olli <[email protected]> AuthorDate: Wed Oct 14 21:26:54 2020 +0300 Warn if open files hard limit is under 50k --- buildstream/_frontend/app.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/buildstream/_frontend/app.py b/buildstream/_frontend/app.py index 50e1e79..89b0781 100644 --- a/buildstream/_frontend/app.py +++ b/buildstream/_frontend/app.py @@ -22,6 +22,7 @@ import sys import resource import traceback import datetime +import logging from textwrap import TextWrapper from contextlib import contextmanager @@ -123,6 +124,8 @@ class App(): if limits[0] != limits[1]: # Set soft limit to hard limit resource.setrlimit(resource.RLIMIT_NOFILE, (limits[1], limits[1])) + if limits[1] < 50000: + logging.warning("Open file hard limit is set to %s, consider raising", limits[1]) # create() #
