update_fd_limits: removed comment on future raise

This increases the maximum number of fds by 96 to allow up to
128 scripts being run when close to the maximum limit of clients.

Resolves: #349

Signed-off-by: Nikos Mavrogiannopoulos <n.mavrogiannopoulos@gmail.com>
This commit is contained in:
Nikos Mavrogiannopoulos
2020-12-03 23:44:53 +01:00
parent 86138698fe
commit d08f4832e4

View File

@@ -37,8 +37,12 @@ void init_fd_limits_default(main_server_st * s)
#endif
}
/* (Maximum clients) + (small buffer) + (sec mod fds) */
#define MAX_FD_LIMIT(clients) (clients + 32 + s->sec_mod_instance_count * 2)
/* (Maximum clients) + (small buffer) + (sec mod fds)
* The (small buffer) is to allow unknown fds used by backends (e.g.,
* gnutls) as well as to allow running up to that many scripts (due to dup2)
* when close to the maximum limit.
*/
#define MAX_FD_LIMIT(clients) (clients + 128 + s->sec_mod_instance_count * 2)
/* Adjusts the file descriptor limits for the main or worker processes
*/
@@ -51,7 +55,6 @@ void update_fd_limits(main_server_st * s, unsigned main)
if (main) {
if (GETCONFIG(s)->max_clients > 0)
// FUTURE: Should this be raises to account for scripts?
max = MAX_FD_LIMIT(GETCONFIG(s)->max_clients);
else
// If the admin doesn't specify max_clients,