diff options
author | Reyk Floeter <reyk@cvs.openbsd.org> | 2010-11-30 14:38:46 +0000 |
---|---|---|
committer | Reyk Floeter <reyk@cvs.openbsd.org> | 2010-11-30 14:38:46 +0000 |
commit | 7ea40dff4280f76e0960ee9f89356940ef086de8 (patch) | |
tree | 6b9fb3462a9cbdc8af6180a1105ce6e1ca1d2169 /usr.sbin/relayd/hce.c | |
parent | 9620c54f3a872c8681d22dc31eaecc6545b83540 (diff) |
The relayd processes did already bump up the socket file descriptor
resource limits to the maximum of the daemon class but the host check
process (hce/health checks) didn't and was limited to a fairly low
default of 128 open sockets (openfiles-cur=128 in login.conf). This
was reached fairly quickly with "check tcp" of many hosts. This diff
increases the maximum number of monitored hosts and concurrent health
checks in relayd in a significant way and may fix issues for people
that have around 100 or more hosts (or fewer hosts with multiple checked
ports).
tested by phessler@
ok jsg@
Diffstat (limited to 'usr.sbin/relayd/hce.c')
-rw-r--r-- | usr.sbin/relayd/hce.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/usr.sbin/relayd/hce.c b/usr.sbin/relayd/hce.c index 2eb5601d160..0b4fd042d64 100644 --- a/usr.sbin/relayd/hce.c +++ b/usr.sbin/relayd/hce.c @@ -1,4 +1,4 @@ -/* $OpenBSD: hce.c,v 1.55 2010/05/14 11:13:36 reyk Exp $ */ +/* $OpenBSD: hce.c,v 1.56 2010/11/30 14:38:45 reyk Exp $ */ /* * Copyright (c) 2006 Pierre-Yves Ritschard <pyr@openbsd.org> @@ -120,6 +120,9 @@ hce(struct relayd *x_env, int pipe_parent2pfe[2], int pipe_parent2hce[2], event_init(); + /* Allow maximum available sockets for TCP checks */ + socket_rlimit(-1); + if ((iev_pfe = calloc(1, sizeof(struct imsgev))) == NULL || (iev_main = calloc(1, sizeof(struct imsgev))) == NULL) fatal("hce"); |