chiark / gitweb /
debianutils: Update from 4.8.3 to 4.8.4
[termux-packages] / packages / redis / lower-default-values.patch
1 Avoid warnings on startup due to trying to set too high maxclients
2 and tcp-backlog.
3
4 Values observed on a Xperia Z4 Tablet running Android 7.0.
5 diff -u -r ../redis-3.2.8/redis.conf ./redis.conf
6 --- ../redis-3.2.8/redis.conf   2017-02-12 16:14:57.000000000 +0100
7 +++ ./redis.conf        2017-03-07 14:38:42.825991097 +0100
8 @@ -90,7 +90,7 @@
9  # will silently truncate it to the value of /proc/sys/net/core/somaxconn so
10  # make sure to raise both the value of somaxconn and tcp_max_syn_backlog
11  # in order to get the desired effect.
12 -tcp-backlog 511
13 +tcp-backlog 128
14  
15  # Unix socket.
16  #
17 @@ -501,7 +501,7 @@
18  ################################### LIMITS ####################################
19  
20  # Set the max number of connected clients at the same time. By default
21 -# this limit is set to 10000 clients, however if the Redis server is not
22 +# this limit is set to 4000 clients, however if the Redis server is not
23  # able to configure the process file limit to allow for the specified limit
24  # the max number of allowed clients is set to the current file limit
25  # minus 32 (as Redis reserves a few file descriptors for internal uses).
26 @@ -509,7 +509,7 @@
27  # Once the limit is reached Redis will close all the new connections sending
28  # an error 'max number of clients reached'.
29  #
30 -# maxclients 10000
31 +# maxclients 4000
32  
33  # Don't use more memory than the specified amount of bytes.
34  # When the memory limit is reached Redis will try to remove keys
35 diff -u -r ../redis-3.2.8/src/server.h ./src/server.h
36 --- ../redis-3.2.8/src/server.h 2017-02-12 16:14:57.000000000 +0100
37 +++ ./src/server.h      2017-03-07 14:38:53.357859408 +0100
38 @@ -79,7 +79,7 @@
39  #define CONFIG_MIN_HZ            1
40  #define CONFIG_MAX_HZ            500
41  #define CONFIG_DEFAULT_SERVER_PORT        6379    /* TCP port */
42 -#define CONFIG_DEFAULT_TCP_BACKLOG       511     /* TCP listen backlog */
43 +#define CONFIG_DEFAULT_TCP_BACKLOG       128     /* TCP listen backlog */
44  #define CONFIG_DEFAULT_CLIENT_TIMEOUT       0       /* default client timeout: infinite */
45  #define CONFIG_DEFAULT_DBNUM     16
46  #define CONFIG_MAX_LINE    1024
47 @@ -94,7 +94,7 @@
48  #define AOF_REWRITE_ITEMS_PER_CMD 64
49  #define CONFIG_DEFAULT_SLOWLOG_LOG_SLOWER_THAN 10000
50  #define CONFIG_DEFAULT_SLOWLOG_MAX_LEN 128
51 -#define CONFIG_DEFAULT_MAX_CLIENTS 10000
52 +#define CONFIG_DEFAULT_MAX_CLIENTS 4000
53  #define CONFIG_AUTHPASS_MAX_LEN 512
54  #define CONFIG_DEFAULT_SLAVE_PRIORITY 100
55  #define CONFIG_DEFAULT_REPL_TIMEOUT 60