This is an automated email from the ASF dual-hosted git repository.

sbp pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/tooling-trusted-releases.git


The following commit(s) were added to refs/heads/main by this push:
     new 21e43cb  Remove resource limits on task workers
21e43cb is described below

commit 21e43cbc5828b27cd8267f643eae0d1e8a704a3d
Author: Sean B. Palmer <[email protected]>
AuthorDate: Tue Dec 9 15:41:48 2025 +0000

    Remove resource limits on task workers
---
 atr/worker.py | 13 +++++++------
 1 file changed, 7 insertions(+), 6 deletions(-)

diff --git a/atr/worker.py b/atr/worker.py
index f8ee447..d2ba596 100644
--- a/atr/worker.py
+++ b/atr/worker.py
@@ -26,7 +26,6 @@ import asyncio
 import datetime
 import inspect
 import os
-import resource
 import signal
 import traceback
 from typing import Any, Final
@@ -267,6 +266,7 @@ async def _worker_loop_run() -> None:
 
 def _worker_resources_limit_set() -> None:
     """Set CPU and memory limits for this process."""
+    # TODO: https://github.com/apache/tooling-trusted-releases/issues/411
     # # Set CPU time limit
     # try:
     #     resource.setrlimit(resource.RLIMIT_CPU, (CPU_LIMIT_SECONDS, 
CPU_LIMIT_SECONDS))
@@ -275,11 +275,12 @@ def _worker_resources_limit_set() -> None:
     #     log.warning(f"Could not set CPU time limit: {e}")
 
     # Set memory limit
-    try:
-        resource.setrlimit(resource.RLIMIT_AS, (_MEMORY_LIMIT_BYTES, 
_MEMORY_LIMIT_BYTES))
-        log.info(f"Set memory limit to {_MEMORY_LIMIT_BYTES} bytes")
-    except ValueError as e:
-        log.warning(f"Could not set memory limit: {e}")
+    # try:
+    #     resource.setrlimit(resource.RLIMIT_AS, (_MEMORY_LIMIT_BYTES, 
_MEMORY_LIMIT_BYTES))
+    #     log.info(f"Set memory limit to {_MEMORY_LIMIT_BYTES} bytes")
+    # except ValueError as e:
+    #     log.warning(f"Could not set memory limit: {e}")
+    return
 
 
 if __name__ == "__main__":


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to