guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

branch master updated: remote-server: Increase max open files limit.


From: Mathieu Othacehe
Subject: branch master updated: remote-server: Increase max open files limit.
Date: Sun, 09 Jan 2022 04:51:20 -0500

This is an automated email from the git hooks/post-receive script.

mothacehe pushed a commit to branch master
in repository guix-cuirass.

The following commit(s) were added to refs/heads/master by this push:
     new d81d994  remote-server: Increase max open files limit.
d81d994 is described below

commit d81d9949791df44d70de08e3551d8f15d517180f
Author: Mathieu Othacehe <othacehe@gnu.org>
AuthorDate: Sun Jan 9 10:50:13 2022 +0100

    remote-server: Increase max open files limit.
    
    * src/cuirass/scripts/remote-server.scm (cuirass-remote-server): Increase 
it.
---
 src/cuirass/scripts/remote-server.scm | 12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/src/cuirass/scripts/remote-server.scm 
b/src/cuirass/scripts/remote-server.scm
index 10b601a..87cb907 100644
--- a/src/cuirass/scripts/remote-server.scm
+++ b/src/cuirass/scripts/remote-server.scm
@@ -595,6 +595,18 @@ exiting."
         ;; Enable core dump generation.
         (setrlimit 'core #f #f)
 
+        ;; Increase max open files limit to 2048.
+        (let ((limit 2048))
+          (call-with-values (lambda () (getrlimit 'nofile))
+            (lambda (soft hard)
+              (when (and soft (< soft limit))
+                (if hard
+                    (setrlimit 'nofile (min hard limit) hard)
+                    (setrlimit 'nofile limit #f))
+                (log-info
+                 "increased maximum number of open files from ~d to ~d"
+                 soft (if hard (min hard limit) limit))))))
+
         (and cache
              (%cache-directory cache))
 



reply via email to

[Prev in Thread] Current Thread [Next in Thread]