Skip to content

Commit

Permalink
*-login: Removed enforcing maximum calculated fd limit.
Browse files Browse the repository at this point in the history
Just use the regular ulimit. Login process has become complicated enough
that counting the exact fd size isn't so easy anymore.

Also apparently this low fd limit is causing errors with new Linux kernels:
pop3-login: Error: fd_send(pop3, 18) failed: Too many references: cannot splice
  • Loading branch information
sirainen authored and GitLab committed Oct 26, 2016
1 parent 67574bb commit def2e15
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/login-common/main.c
Expand Up @@ -346,11 +346,14 @@ static void main_preinit(void)
- 1 for login proxy
- 2 for client-side ssl proxy
- 2 for server-side ssl proxy (with login proxy)
However, login process nowadays supports plugins, there are rawlogs
and so on. Don't enforce the fd limit anymore, but use this value
for optimizing the ioloop's fd table size.
*/
max_fds = MASTER_LISTEN_FD_FIRST + 16 +
master_service_get_socket_count(master_service) +
master_service_get_client_limit(master_service)*6;
restrict_fd_limit(max_fds);
io_loop_set_max_fd_count(current_ioloop, max_fds);

i_assert(strcmp(global_ssl_settings->ssl, "no") == 0 ||
Expand Down

0 comments on commit def2e15

Please sign in to comment.