NFS - Increase server-side listen queue for TCP connections from 5 to 64
authorMatthew Dillon <dillon@apollo.backplane.com>
Sun, 26 Jul 2009 18:56:13 +0000 (11:56 -0700)
committerMatthew Dillon <dillon@apollo.backplane.com>
Sun, 26 Jul 2009 18:56:13 +0000 (11:56 -0700)
* The listen queue was not big enough, sometimes when clients boot up
  they get stuck for a short period of time due to their NFS connections
  getting thrown away by the server.

sbin/nfsd/nfsd.c

index 71c493e..5a4d0d0 100644 (file)
@@ -510,7 +510,7 @@ main(int argc, char **argv)
                                            bindhost[i]);
                                        nfsd_exit(1);
                                }
-                               if (listen(tcpsock, 5) < 0) {
+                               if (listen(tcpsock, 64) < 0) {
                                        syslog(LOG_ERR, "listen failed");
                                        nfsd_exit(1);
                                }
@@ -585,7 +585,7 @@ main(int argc, char **argv)
                                            bindhost[i]);
                                        nfsd_exit(1);
                                }
-                               if (listen(tcp6sock, 5) < 0) {
+                               if (listen(tcp6sock, 64) < 0) {
                                        syslog(LOG_ERR, "listen failed");
                                        nfsd_exit(1);
                                }