Open vikramsubramanian opened 4 months ago
Summary: Test process opens too many files, causing "too many opened files" error.
ulimit
for open files in the system or for the user running the make test
command. This can be done temporarily for the session with ulimit -n <new_limit>
or permanently by editing /etc/security/limits.conf
or a similar system configuration file.teardown_test_environment()
is closing all open files after each test case or test suite.parallel_hash_index()
function to limit the number of simultaneously open files, or to ensure that files are closed as soon as they are no longer needed.Makefile
and any associated test scripts to see if there is a way to configure the number of threads or processes used during testing, which may indirectly control the number of open files.The code snippet includes a test that sets the maximum number of threads for execution, which could be related to the issue of too many files being opened during tests.
My local machine has ulimit 256 and when I run
make test
it starts complainingtoo many opened files
. I assume this partially because we open 64 files in order to parallel hash index. But still 256 should be sufficient to run tests.P.S. I'm labelling this as a bug for now. Feel free to change if this is expected. )