-
-
Notifications
You must be signed in to change notification settings - Fork 5.3k
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
Reduce monitor minimum interval to 1 second #1740
base: master
Are you sure you want to change the base?
Reduce monitor minimum interval to 1 second #1740
Conversation
4227e75
to
dcd723b
Compare
louislam#1645 has been added by changing the minimum value from 20 to 1. A warning has been added that shows when the user enters a value less than 20 to state that performance issues may be enountered. Signed-off-by: Matthew Nickson <mnickson@sidingsmedia.com>
Oops, sorry about that. I saw that the test had passed and didn't think to check the output. I wonder if it might be an idea to fail the test on warnings as well as errors. This would be a good spot if github had another result type for warnings. |
@louislam is there a reason this has not yet been merged? This is something that's preventing deployment for a couple sites for us. |
Hello, I have downloaded version 1.17.1 for docker, but when in the type of monitor that is ping, I set the heartbeat interval value to 1 second, it does not let me advance but asks me for at least 20 seconds. As I read this feature was added, but in ping it does not allow me. Could it be that this added does not contemplate the ping in 1 second? |
This has not yet been merged and as such is not present in this release |
I may prefer making this harder to be set. Maybe we can add a env var |
Why? There will just be tutorials about how to do it and everyone will do it anyway. |
I think I have to agree with @ylluminate. Adding an env var would I think over complicate setting a smaller value. I don't really know what adding another environment variable would accomplish here other than making it harder to set. Whilst making it harder to set could prevent a user setting the value too low and then encountering performance issues, I think that the warning also serves the same purpose without adding extra complexity. |
It is because setting it to very low likely causes issues such as random timeout, very high cpu usage, very high database usage and the database locking issue. Uptime Kuma also is not designed for that purpose. If it is too easy for users to use this feature. They will likely forget your warning message. Then they will just create a bug report here and think Uptime Kuma is unstable. So I want this to be a hidden feature. |
In this case, it would be important that this feature is activated in the graphical environment and that when doing so, a large warning appears indicating the possible consequences. And the way to disable it manually in case of failures is documented. You can even set as experimental function. |
I just tested it with 1 second, it was so unstable and my Uptime Kuma was under heavy loading and slow response. The monitor is dead even I changed back to 3600s. Using env var is just a suggestion. Other methods could be considered. |
It is also a possible way, just like chrome://flags/. |
I see where you are comming from. I certainly think it should be a graphical option over an environment variable. Perhaps if the user sets the value to below 20, they have to click through a prompt when saving to reinforce the message that this is a possibly unstable feature. |
Yes, it would be a good, very visual way of warning the user about the change they are going to make. |
A prompt has been added to confirm with the user that they wish to reduce the interval value to possibly unstable values. A random (pseudo random) code is generated which they must input in order to confirm their descision. Failiure to confirm their descision will result in an error when saving. As not to annoy the user too much, the promt is only required when it is detected that the interval value has been changed. Signed-off-by: Matthew Nickson <mnickson@sidingsmedia.com>
Signed-off-by: Matthew Nickson <mnickson@sidingsmedia.com>
I have now added a confirmation dialog for when the use sets the interval to below 20. Technical description from commit message:
ScreenshotThis PR should now be ready for review. |
Description
This will change the minimum interval value from 20 to 1 second. However, the user will be warned if they reduce the minimum interval below 20 seconds that performance may suffer
Fixes #1645
Type of change
Please delete any options that are not relevant.
Checklist
(including JSDoc for methods)