From f4bfe600b2545150269580fee823179398c66afa Mon Sep 17 00:00:00 2001 From: Federico Stagni Date: Wed, 20 Nov 2024 09:52:48 +0100 Subject: [PATCH] sweep: #7891 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 6b12ae5dfa4..732d7360de3 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