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

Attempt to to set our own soft limits #26

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

jesterhodl
Copy link
Contributor

  1. attempt to set out own soft limits
  2. 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.

Maciej Sołtysiak and others added 2 commits October 22, 2024 18:47
1. attempt to set out own soft limits
2. align wording: "hard open file limit" and "soft open file limit"
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

Successfully merging this pull request may close these issues.

1 participant