diff options
author | Seppo Yli-Olli <seppo.yliolli@gmail.com> | 2020-10-14 21:26:54 +0300 |
---|---|---|
committer | Seppo Yli-Olli <seppo.yliolli@gmail.com> | 2020-10-14 21:26:54 +0300 |
commit | 80b7bb5a4596367570afa4b1d61178abcad8ec72 (patch) | |
tree | e9a6ddbecc570111b6535fadae22e9d4dea535e9 | |
parent | de9e152a01748c8360b84235ff715bf6469e261d (diff) | |
download | buildstream-nanonyme/warn-nofile.tar.gz |
Warn if open files hard limit is under 50knanonyme/warn-nofile
-rw-r--r-- | buildstream/_frontend/app.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/buildstream/_frontend/app.py b/buildstream/_frontend/app.py index 50e1e79b0..89b078166 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() # |