Hiya
does anyone know what the max is for max_clients & cache_size ?
what is the limitation with this software with those two settings is there an option for unlimited clients and unlimited cache size if not can it be added and fixed
there is no information here about either
https://github.com/DNSCrypt/dnscrypt-proxy/blob/master/dnscrypt-proxy/example-dnscrypt-proxy.toml
I'm not sure why you think you need these to be unlimited, but you can just look at the code to find the upper bounds.
https://github.com/DNSCrypt/dnscrypt-proxy/blob/45b915882a86ed7a63f368d6c160723de49e69d4/dnscrypt-proxy/config.go#L82
max_clients is an unsigned 32-bit integer, so the largest value it can hold is 4,294,967,295. If you have this many clients, you probably need more than 1 instance of dnscrypt-proxy for other reasons.
https://github.com/DNSCrypt/dnscrypt-proxy/blob/45b915882a86ed7a63f368d6c160723de49e69d4/dnscrypt-proxy/config.go#L54
cache_size is a signed integer either 32-bit or 64-bit long depending on the build you're running, so the largest value it can hold is either 2,147,483,647 or 9,223,372,036,854,775,807. Since each entry in the cache consumes at least 24 bytes (I've drastically oversimplified this and only looked very briefly at the internals), a 32-bit system would need more than 48GiB RAM to reach this limit and I'm pretty certain there's a hard address space limit that means you'll never get more than 4GiB in such a machine. If you have a 64-bit system and reach the limit, then please do help with testing a fix...
Most helpful comment
I'm not sure why you think you need these to be unlimited, but you can just look at the code to find the upper bounds.
https://github.com/DNSCrypt/dnscrypt-proxy/blob/45b915882a86ed7a63f368d6c160723de49e69d4/dnscrypt-proxy/config.go#L82
max_clientsis an unsigned 32-bit integer, so the largest value it can hold is4,294,967,295. If you have this many clients, you probably need more than 1 instance ofdnscrypt-proxyfor other reasons.https://github.com/DNSCrypt/dnscrypt-proxy/blob/45b915882a86ed7a63f368d6c160723de49e69d4/dnscrypt-proxy/config.go#L54
cache_sizeis a signed integer either 32-bit or 64-bit long depending on the build you're running, so the largest value it can hold is either2,147,483,647or9,223,372,036,854,775,807. Since each entry in the cache consumes at least 24 bytes (I've drastically oversimplified this and only looked very briefly at the internals), a 32-bit system would need more than 48GiB RAM to reach this limit and I'm pretty certain there's a hard address space limit that means you'll never get more than 4GiB in such a machine. If you have a 64-bit system and reach the limit, then please do help with testing a fix...