mirror of
https://codeberg.org/grunfink/snac2.git
synced 2024-11-09 19:50:26 +03:00
Show the fd rlimit at httpd startup.
This commit is contained in:
parent
b48a4ddfa6
commit
03325d04a5
1
data.c
1
data.c
@ -15,6 +15,7 @@
|
||||
#include <sys/file.h>
|
||||
#include <fcntl.h>
|
||||
|
||||
|
||||
double disk_layout = 2.7;
|
||||
|
||||
|
||||
|
7
httpd.c
7
httpd.c
@ -15,6 +15,8 @@
|
||||
#include <pthread.h>
|
||||
#include <semaphore.h>
|
||||
|
||||
#include <sys/resource.h> // 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);
|
||||
|
Loading…
Reference in New Issue
Block a user