]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
Increase listen queues to handle high loads better.
authorTimo Sirainen <tss@iki.fi>
Wed, 7 Jan 2009 18:34:25 +0000 (13:34 -0500)
committerTimo Sirainen <tss@iki.fi>
Wed, 7 Jan 2009 18:34:25 +0000 (13:34 -0500)
Patch by Apple.

--HG--
branch : HEAD

src/auth/main.c
src/dict/dict-server.c
src/master/auth-process.c
src/master/dict-process.c
src/master/listener.c

index ea49f05f05efff8f82296aec000407bd2bcedb85..b7168b2690f0ffb1751faf132d2e2259ae6778a0 100644 (file)
@@ -153,9 +153,9 @@ static void add_extra_listeners(void)
                        break;
 
                str = t_strdup_printf("AUTH_%u", i);
-               client_fd = create_unix_listener(str, 64);
+               client_fd = create_unix_listener(str, 128);
                str = t_strdup_printf("AUTH_%u_MASTER", i);
-               master_fd = create_unix_listener(str, 64);
+               master_fd = create_unix_listener(str, 128);
 
                listener = auth_master_listener_create(auth);
                if (master_fd != -1) {
index 975c6ff3b2584ecc9cc711d66c06c187f79b922b..da1a15da02ba533f4f87ef914a8cf98a3d6d4dfe 100644 (file)
@@ -525,7 +525,7 @@ struct dict_server *dict_server_init(const char *path, int fd)
        server = i_new(struct dict_server, 1);
        server->path = i_strdup(path);
        server->fd = fd != -1 ? fd :
-               net_listen_unix_unlink_stale(path, 64);
+               net_listen_unix_unlink_stale(path, 128);
        if (server->fd == -1) {
                if (errno == EADDRINUSE)
                        i_fatal("Socket already exists: %s", path);
index 7e34426fd6a39d2b81ec64d43bf0e5b2959b2cb1..051fbb98d6ab7474a228220d9dae692d67512994 100644 (file)
@@ -327,7 +327,7 @@ auth_process_new(pid_t pid, int fd, struct auth_process_group *group)
                               dec2str(pid));
        p->worker_listen_fd =
                unix_socket_create(path, 0600, group->set->uid,
-                                  group->set->gid, 16);
+                                  group->set->gid, 128);
        if (p->worker_listen_fd == -1)
                i_fatal("Couldn't create auth worker listener");
 
@@ -712,7 +712,7 @@ static void auth_process_group_create(struct auth_settings *auth_set)
        path = t_strconcat(auth_set->parent->defaults->login_dir, "/",
                           auth_set->name, NULL);
        group->listen_fd = unix_socket_create(path, 0660, master_uid,
-                                             auth_set->parent->login_gid, 16);
+                                             auth_set->parent->login_gid, 128);
        if (group->listen_fd == -1)
                i_fatal("Couldn't create auth process listener");
 
index 43a9e9e77cf65357714db5957b24d7bb5ac11aa2..6101b5a9d51d455398bc4cb2cd94d3c003d7fd7f 100644 (file)
@@ -116,7 +116,7 @@ static int dict_process_listen(struct dict_process *process)
        mode_t old_umask;
 
        old_umask = umask(0);
-       process->fd = net_listen_unix_unlink_stale(process->path, 64);
+       process->fd = net_listen_unix_unlink_stale(process->path, 128);
        umask(old_umask);
        if (process->fd == -1) {
                if (errno == EADDRINUSE)
index a564082079214f4d445ec4918ac96a3c28b82c24..53f4d976f6875f0245772990f5ee3f5bdcba6c69 100644 (file)
@@ -282,8 +282,8 @@ listener_array_listen_missing(const char *proto,
                        continue;
 
                for (j = 0; j < 10; j++) {
-                       listens[i].fd =
-                               net_listen(&listens[i].ip, &listens[i].port, 8);
+                       listens[i].fd = net_listen(&listens[i].ip,
+                                                  &listens[i].port, 128);
                        if (listens[i].fd != -1)
                                break;