mirror of
https://github.com/louislam/uptime-kuma.git
synced 2026-03-02 22:57:00 -05:00
Uptime will cache CDN,and cannot automatically update cache content #2406
Labels
No labels
A:accessibility
A:api
A:cert-expiry
A:core
A:dashboard
A:deployment
A:documentation
A:domain expiry
A:incidents
A:maintenance
A:metrics
A:monitor
A:notifications
A:reports
A:settings
A:status-page
A:ui/ux
A:user-management
Stale
ai-slop
blocked
blocked-upstream
bug
cannot-reproduce
dependencies
discussion
duplicate
feature-request
feature-request
good first issue
hacktoberfest
help
help wanted
house keeping
invalid
invalid-format
invalid-format
question
releaseblocker 🚨
security
spam
type:enhance-existing
type:new
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/uptime-kuma#2406
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @qiaokuan1992 on GitHub (Jul 23, 2023).
⚠️ Please verify that this bug has NOT been raised before.
🛡️ Security Policy
Description
Uptime will cache CDN, After I update the content and refresh the CDN cache, uptime cannot automatically disable old cache content
👟 Reproduction steps
👀 Expected behavior
Every time the runtime checks, it is important to avoid using the contents of the cache as much as possible; Alternatively, there may be a method for manually clearing the cache
😓 Actual Behavior
During runtime checks, the contents of the cache are constantly used and no way to forcibly refresh the cache has been found
🐻 Uptime-Kuma Version
1.21.2
💻 Operating System and Arch
Docker
🌐 Browser
Microsoft EDGE
🐋 Docker Version
20.10.17
🟩 NodeJS Version
📝 Relevant log output
No response
@louislam commented on GitHub (Jul 23, 2023):
There is no cache mechanism for caching content in Uptime Kuma.
Which monitor type did you actually mean? Ping or HTTPS?
And what exactly is "CDN information"?
@qiaokuan1992 commented on GitHub (Jul 23, 2023):
I use HTTPS to monitor the running status of the website. When my CDN configuration is incorrect, uptime show a message:
[MONITOR] WARN: Monitor #34 'Web': Failing: Maximum number of redirects exceeded | Interval: 20 seconds | Type: http | Down Count: 0 | Resend Interval: 0.
After I fix the CDN configuration, uptime will continue to loop and throw this exception message. However, accessing the website I monitor using a browser is normal
@louislam commented on GitHub (Jul 23, 2023):
Have written a special script that will flip 200/301 status code every 5mins, with cache headers.
Cannot reproduce it.
Since there is no cache mechanism, I believe it is not related to Uptime Kuma. Make sure you have cleared all caches in your CDN edge nodes.
https://louislam.net/test-301.php
@qiaokuan1992 commented on GitHub (Jul 23, 2023):
This 301 redirect exception was caused by an initial configuration error with the CDN, which has been fixed through reconfiguration and cleared the cache of all edge nodes. Currently, all browser accesses are normal.
At the same time, I just started a new uptime container, which is the same version as the current online version. In the new container, I used HTTPS to monitor this website, and the status is normal. Only when I visited the uptime container with redirection errors, I will still be prompted for too many redirects.
@qiaokuan1992 commented on GitHub (Jul 23, 2023):
In my anomaly, the likely cause of the anomaly is https://www.domain.com Created CDN (with cache header) and configuration error caused the following 301 redirect exception:
1 http://www.domain.com Redirect to via 301 https://www.domain.com ;
2 https://www.domain.com Redirect to via 301 http://www.domain.com ;
And the CDN may also cache this redirect request, which is accompanied by a redirect request header. When our online production environment's uptime monitoring accesses this redirect, it begins to continuously generate
@CommanderStorm commented on GitHub (Jul 24, 2023):
Currently, I could not replicate this issue.
Can you provide us a Minimal, Reproducible Example?
Louis set caching headers on his MRE.
@qiaokuan1992 commented on GitHub (Jul 24, 2023):
I attempted to configure 301 redirection between HTTP and HTTPS in nginx and added cache headers:
But I was unable to reproduce this issue, and I added my domain name again in the uptime of the production environment. At the beginning, the monitoring was normal, but after running it a few times, there was another abnormal message with too many redirects
@CommanderStorm commented on GitHub (Jul 24, 2023):
Please provide all the details about the test setup with which you can reproduce this behaviour.
What is your nginx configuration, what did you do between test runs?
Providing a Minimal, Reproducible Example in this case is very nessesary to be able to reproduce this.
@qiaokuan1992 commented on GitHub (Jul 24, 2023):
in my case, I use CDN services cache my domain static files,
first, enable domain https setting in CDN services, set upstream to domain http server in port 80, this CDN cache expire time is 30d.
Then set nginx config for http server (port 80), use 301 redirect to https server (port 443), at this time, use browser or uptime request https://mydomain.com, has message with too many redirects.
When I changed the upstream server port of CDN to 443, When I changed the upstream server port of CDN to 443, However, there is still this error message in uptime.
I am very sorry that I cannot conduct further experiments to reproduce this situation as I do not have private CDN resources.
@CommanderStorm commented on GitHub (Dec 14, 2023):
Closing as this is highly likely a duplicate of or resolved by #575