Hey,
in this thread well go thru the topic of rlimints and more specific the rlimit for concurrent open files.
if you're lazy to read, just directly skip ahead to point 5.
1. Is a "rlimit"?
"rlimit" just stands for resource limit.
As the longer name already explains, these limits regulate the systems resources a process can use.
In general, each rlimit has a "soft" and a "hard" limit. Soft limits are changeable values by the process itself.
Hard limits, on the other hand, could only be changed by a system administrator or by editing the
2. How to change rlimits?
To change rlimits on all Unix based system, you just simply have to use the command "ulimit" or edit the
Even thou it's confusing, "ulimit" will change the so-called "rlimits".
A good explanation, how to use the command, could be found here: https://linuxhint.com/linux_ulimit_command/
3. Why does TeaSpeak shows this warning: "Open file rlimit is bellow 16384 [...]"
To understand this error we've to split it up into two parts.
Firstly we've to inspect what the "open file rlimit means" and secondly well gather which value it should have.
3.1 Whats is the "Open file rlimit"?
As you may know, Unix based architectures have this wonderful philosophy: "Everything is a file.".
But as a regulation, so that no process fillups the system with unnecessary stuff like file handles, Linux has a resource limit. In terms of open files its the "open file descriptor limit" or " nofiles".
It's a limit of concurrently open files by one process.
3.2 What should be a good value?
Now the Unix philosophy comes in play. So this also includes every server socket. So for one for every address & port you bind to, you'll have to open a file.
So for every virtual server, you start you need at least one file handle. But because each virtual server could be bound
to multiple addresses, the server mostly requires more file handles. To calculate that, just simply count the addresses each virtual server binds to.
By default, this value should be 2 (Each VS binds to IPv4 & IPv6).
But the webserver, for the web client, will also bind to the given addresses on TCP. This means that the previous value multiplies by 2.
This means with the default configuration each virtual server requires at least 4 file handles.
A more precise calculation of allocated open file handles is listed within this table:
So in total, you see, that by default, without any virtual server the server, TeaSpeak could require up to ~300 open file handles.
That's not really that much and should fit even under the default limit of 1024, but as soon you create more virtual servers, this will problematic.
For exampel an instance with 200 virtual servers could have up to
If the rlimit is bellow that, the server will start to disfunction and may crash or hangup.
4. Sum up
I hope this tutorial helps you understand the meaning behind rlimits, especially the Waring TeaSpeak gives at the start of the server if its to low.
But for everybody who is just lazy reading, which you're probably not, else you wouldn't get this far, here is a "quick" fix:
5. Quick fix, for everybody who just wants to get rid of that error.
Just execute this command as the user you're starting TeaSpeak with:
in this thread well go thru the topic of rlimints and more specific the rlimit for concurrent open files.
if you're lazy to read, just directly skip ahead to point 5.
1. Is a "rlimit"?
"rlimit" just stands for resource limit.
As the longer name already explains, these limits regulate the systems resources a process can use.
In general, each rlimit has a "soft" and a "hard" limit. Soft limits are changeable values by the process itself.
Hard limits, on the other hand, could only be changed by a system administrator or by editing the
/etc/security/limits.conf
config file.2. How to change rlimits?
To change rlimits on all Unix based system, you just simply have to use the command "ulimit" or edit the
/etc/security/limits.conf
config file.Even thou it's confusing, "ulimit" will change the so-called "rlimits".
A good explanation, how to use the command, could be found here: https://linuxhint.com/linux_ulimit_command/
3. Why does TeaSpeak shows this warning: "Open file rlimit is bellow 16384 [...]"
To understand this error we've to split it up into two parts.
Firstly we've to inspect what the "open file rlimit means" and secondly well gather which value it should have.
3.1 Whats is the "Open file rlimit"?
As you may know, Unix based architectures have this wonderful philosophy: "Everything is a file.".
But as a regulation, so that no process fillups the system with unnecessary stuff like file handles, Linux has a resource limit. In terms of open files its the "open file descriptor limit" or " nofiles".
It's a limit of concurrently open files by one process.
3.2 What should be a good value?
Now the Unix philosophy comes in play. So this also includes every server socket. So for one for every address & port you bind to, you'll have to open a file.
So for every virtual server, you start you need at least one file handle. But because each virtual server could be bound
to multiple addresses, the server mostly requires more file handles. To calculate that, just simply count the addresses each virtual server binds to.
By default, this value should be 2 (Each VS binds to IPv4 & IPv6).
But the webserver, for the web client, will also bind to the given addresses on TCP. This means that the previous value multiplies by 2.
This means with the default configuration each virtual server requires at least 4 file handles.
A more precise calculation of allocated open file handles is listed within this table:
Component name | Potential open files |
---|---|
Virtual Server | As explained above, the formula is like this:n = <number of binding addresses> * 2 |
File Server | The file server could take up to "serverinstance_filetransfer_max_connections" concurrent connections. This means the same amount of file descriptors. We need to add one as a space descriptor opened for error handling. This means: n = <serverinstance_filetransfer_max_connections> + <number of binding addresses> + 1 |
Query Server | The query server behaves like the file server.n = <serverinstance_query_max_connections> + <number of binding addresses> + 1 |
Conversation System | This is highly dependable on your users activity. All open files will be closed every 5 minutes. One file per conversation will be opened as soon the conversion gets loaded. So a ruff guess would be for an average server with (10 VS and total 1000 Users): n = 120 |
Web Client + Web voice bridge | This highly depends on the underlying implementation of libnice. But it should be approximately 3 file handles per clients. n = 3 * <number of online web clients> |
Core System | The core system includes the terminal, logging system, etc. A ruff approximation would be (it also depend on your log settings!): n = 5 |
That's not really that much and should fit even under the default limit of 1024, but as soon you create more virtual servers, this will problematic.
For exampel an instance with 200 virtual servers could have up to
200 * 4 + 300 = 1200
concurrent open files.If the rlimit is bellow that, the server will start to disfunction and may crash or hangup.
4. Sum up
I hope this tutorial helps you understand the meaning behind rlimits, especially the Waring TeaSpeak gives at the start of the server if its to low.
But for everybody who is just lazy reading, which you're probably not, else you wouldn't get this far, here is a "quick" fix:
5. Quick fix, for everybody who just wants to get rid of that error.
Just execute this command as the user you're starting TeaSpeak with:
Code:
echo "$USER hard nofile 16384" | sudo tee -a /etc/security/limits.conf
Last edited: