From 49df0ba20a1eba1c8f201551c5601342148b849b Mon Sep 17 00:00:00 2001 From: Federico Stagni Date: Tue, 19 Nov 2024 11:51:30 +0100 Subject: [PATCH] fix: added ulimit -n 1048575 to pilotwrapper content --- .../WorkloadManagementSystem/Utilities/PilotWrapper.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/DIRAC/WorkloadManagementSystem/Utilities/PilotWrapper.py b/src/DIRAC/WorkloadManagementSystem/Utilities/PilotWrapper.py index 4056df949bd..50b8bf5ed99 100644 --- a/src/DIRAC/WorkloadManagementSystem/Utilities/PilotWrapper.py +++ b/src/DIRAC/WorkloadManagementSystem/Utilities/PilotWrapper.py @@ -19,6 +19,13 @@ import tempfile pilotWrapperContent = """#!/bin/bash +# Reduce the maximum allowed number of open file descriptors as micromamba +# gets stuck due to https://github.com/DaanDeMeyer/reproc/pull/103 +current_limit=$(ulimit -n) +new_limit=1048575 +if [ "${current_limit}" = "unlimited" ] || [ "${current_limit}" -gt "${new_limit}" ]; then + ulimit -n "${new_limit}" +fi if command -v python &> /dev/null; then py='python' elif command -v python3 &> /dev/null; then