|
@@ -15,6 +15,8 @@
|
|
|
#include <pthread.h>
|
|
|
#include <semaphore.h>
|
|
|
|
|
|
+#include <sys/resource.h> // for getrlimit()
|
|
|
+
|
|
|
|
|
|
|
|
|
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));
|
|
|
+
|
|
|
|
|
|
pthread_mutex_init(&job_mutex, NULL);
|
|
|
sem_init(&job_sem, 0, 0);
|