From a9cf3ae82b29982ba8bd6a675f9247c91beeaf98 Mon Sep 17 00:00:00 2001 From: Elton Soares Date: Fri, 21 Jun 2024 11:25:05 -0300 Subject: [PATCH] Update index.py Setting soft limit (ulimit -Sn) might fail if hard limit is lower (ulimit -Hn). Also, since ";" separator was used the error was only detected at the end of the IndexBuilderMain execution. Now both limits will be set and the IndexBuilderMain will only run if the ulimit succeeds. --- src/qlever/commands/index.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/qlever/commands/index.py b/src/qlever/commands/index.py index 358c4362..d350edd8 100644 --- a/src/qlever/commands/index.py +++ b/src/qlever/commands/index.py @@ -64,7 +64,7 @@ def execute(self, args) -> bool: total_file_size = get_total_file_size( shlex.split(args.input_files)) if total_file_size > 1e10: - index_cmd = f"ulimit -Sn 1048576; {index_cmd}" + index_cmd = f"ulimit -Hn 1048576 && ulimit -Sn 1048576 && {index_cmd}" # Run the command in a container (if so desired). if args.system in Containerize.supported_systems():