From 03325d04a5d24dc77140323c8703aee7b63cb9f1 Mon Sep 17 00:00:00 2001 From: default Date: Fri, 10 Feb 2023 13:39:17 +0100 Subject: [PATCH] Show the fd rlimit at httpd startup. --- data.c | 1 + httpd.c | 7 +++++++ 2 files changed, 8 insertions(+) diff --git a/data.c b/data.c index 72f90cd..a500b03 100644 --- a/data.c +++ b/data.c @@ -15,6 +15,7 @@ #include #include + double disk_layout = 2.7; diff --git a/httpd.c b/httpd.c index a8a6e5f..cf9dd95 100644 --- a/httpd.c +++ b/httpd.c @@ -15,6 +15,8 @@ #include #include +#include // for getrlimit() + /* nodeinfo 2.0 template */ const char *nodeinfo_2_0_template = "" @@ -417,6 +419,11 @@ void httpd(void) srv_log(xs_fmt("httpd start %s:%d %s", address, port, USER_AGENT)); + struct rlimit r; + getrlimit(RLIMIT_NOFILE, &r); + srv_debug(0, xs_fmt("available (rlimit) fds: %d (cur)/%d (max)", + (int) r.rlim_cur, (int) r.rlim_max)); + /* initialize the job control engine */ pthread_mutex_init(&job_mutex, NULL); sem_init(&job_sem, 0, 0);