Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

KeyDB does not respect the maxclients config #147

Closed
hmashudi opened this issue Feb 27, 2020 · 1 comment
Closed

KeyDB does not respect the maxclients config #147

hmashudi opened this issue Feb 27, 2020 · 1 comment

Comments

@hmashudi
Copy link

Hello,

We are facing error during load test keydb server using memtier with clients more than 10K, the error was seems the keydb only respect the default value of CONFIG_DEFAULT_MAX_CLIENTS instead of value from config file.

LOG Line

738:M 27 Feb 2020 12:08:10.910 # Error registering fd event for the new client: Numerical result out of range (fd=10128)
738:M 27 Feb 2020 12:12:10.014 # Error registering fd event for the new client: Numerical result out of range (fd=10128)
738:M 27 Feb 2020 12:12:24.957 # Error registering fd event for the new client: Numerical result out of range (fd=10128)

To Reproduce

run keydb with the following command to expect maxclients is 40K:

keydb-server --port 6379 --server-threads 2 --server-thread-affinity false --protected-mode no --maxclients 40000

To confirm the config loaded:

$ keydb-cli config get maxclients
1) "maxclients"
2) "40000"

test using memtier with the following command to open 12K connections

memtier_benchmark --server <server_ip> --hide-histogram --ratio 0:1 -c 1000 -t 12 --out-file=s1_t1.out --test-time 300

System info
we use n2-highmem-4 on gce instance with keydb compiled under Debian 9.12

keydb version:

$ keydb-server --version
Redis server v=5.3.1 sha=f4319c12:0 malloc=jemalloc-5.1.0 bits=64 build=47182d8b1c57e148

max open files on system was set to 65535 to make sure we are running enough of file descriptors

$ ulimit -Hn
65535
$ ulimit -Sn
65535

Tried to compile with change of the default CONFIG_DEFAULT_MAX_CLIENTS to let say 40K it was able to serve 12K clients/connections with no errors.

@JohnSully
Copy link
Collaborator

Fixed in change 54c96d1

We initialized the thread's event loop before we read the configuration file, so it always used the default maxclients.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants