diff options
author | Eric Wong <normalperson@yhbt.net> | 2012-11-08 16:24:48 -0800 |
---|---|---|
committer | Eric Wong <normalperson@yhbt.net> | 2012-11-09 00:34:20 +0000 |
commit | 05621edc90699ddf09d5a19944a34c2b802815e5 (patch) | |
tree | 94ca66ec4945678b402efd19e6c5a30a2780e0b3 /accept_loop.c | |
parent | b41664ecbb2532772c63f074165b0e413d626fe0 (diff) | |
download | cmogstored-05621edc90699ddf09d5a19944a34c2b802815e5.tar.gz |
In case there are some wacky setups which open way too many connections, we will nuke old HTTP connections (older than 5 seconds) under high FD pressure. We do not drop connections under normal loads. This costs nothing unless we hit ENFILE/EMFILE/ENOMEM when accepting or opening files. This only affects Linux, but we expect most deployments to be Linux anyways.
Diffstat (limited to 'accept_loop.c')
-rw-r--r-- | accept_loop.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/accept_loop.c b/accept_loop.c index 92ca342..498d05f 100644 --- a/accept_loop.c +++ b/accept_loop.c @@ -39,6 +39,7 @@ MOG_NOINLINE static void accept_error_check(struct mog_accept *ac) case ENOBUFS: case ENOMEM: syslog(LOG_ERR, MOG_ACCEPT_FN" failed with: %m"); + mog_fdmap_expire(ac->svc->idle_timeout); return; case ENOSYS: syslog(LOG_CRIT, ENOSYS_msg); |