Default: 2048
+==== listen_backlog ====
+
+Backlog argument for listen(2). Determines how many new unanswered connection
+attempts are kept in queue. When queue is full, futher new connections are dropped.
+
+Default: 128
+
==== sbuf_loopcnt ====
How many times to process data on one connection, before proceeding.
;; buffer for streaming packets
;pkt_buf = 2048
+;; man 2 listen
+;listen_backlog = 128
+
;; networking options, for info: man 7 tcp
;; linux: notify program about new connection only if there
extern char *cf_unix_socket_dir;
extern char *cf_listen_addr;
extern int cf_listen_port;
+extern int cf_listen_backlog;
extern int cf_pool_mode;
extern int cf_max_client_conn;
char *cf_listen_addr = NULL;
int cf_listen_port = 6432;
+int cf_listen_backlog = 128;
#ifndef WIN32
char *cf_unix_socket_dir = "/tmp";
#else
{"pidfile", false, CF_STR, &cf_pidfile},
{"listen_addr", false, CF_STR, &cf_listen_addr},
{"listen_port", false, CF_INT, &cf_listen_port},
+{"listen_backlog", false, CF_INT, &cf_listen_backlog},
#ifndef WIN32
{"unix_socket_dir", false, CF_STR, &cf_unix_socket_dir},
#endif
tune_socket(sock, false);
/* make it accept connections */
- res = listen(sock, 100);
+ res = listen(sock, cf_listen_backlog);
if (res < 0)
fatal_perror("listen");