align wording: "hard open file limit" and "soft open file limit"
We basically check if max_clients is higher than the soft limit and if so, set the soft limit to the max_clients or the hard limit, if max_clients is higher.
It looks like this in action (when I doubled the defaults):
2024-10-22 21:51:39.315 [ datum_stratum_v1_socket_server] INFO: Stratum V1 Server Init complete.
2024-10-22 21:51:39.315 [ datum_stratum_v1_socket_server] WARN: *** NOTE *** Max Stratum clients (2048) exceeds soft open file limit (Soft: 1024 / Hard: 1048576)
2024-10-22 21:51:39.315 [ datum_stratum_v1_socket_server] WARN: *** NOTE *** Attempting to increase the soft limit...
2024-10-22 21:51:39.315 [ datum_stratum_v1_socket_server] INFO: Successfully increased the soft open file limit to 2048
Now that I suggest this PR. Is setting the limits to max_clients sufficient? Surely not, because there are other files open.
This of course doesn't invalidate this PR, because it does what it is supposed to, but I suppose we should have more room.
We basically check if max_clients is higher than the soft limit and if so, set the soft limit to the max_clients or the hard limit, if max_clients is higher.
It looks like this in action (when I doubled the defaults):
Now that I suggest this PR. Is setting the limits to max_clients sufficient? Surely not, because there are other files open. This of course doesn't invalidate this PR, because it does what it is supposed to, but I suppose we should have more room.