bosun-monitor / bosun

Time Series Alerting Framework
http://bosun.org
MIT License
3.4k stars 495 forks source link

Enable scheduled web cache cleanup #2502

Closed harudark closed 1 year ago

harudark commented 2 years ago

Description

var cacheObj = cache.New("web", 100) is a cache for web requests. For some heavy Graphite queries, due to the existence of cache, the memory used by json unmarshalling cannot be released for long time. Create a schedule task to clear the cache.

Type of change

How has this been tested?

This has been running with the following configuration in production.

......
# Enable scheduled web cache clear task. Default is false.
ScheduledClearWebCache = true

# The frequency of scheduled web cache clear task. Default is "24h".
ScheduledClearWebCacheDuration = "24h"
......

Checklist:

stale[bot] commented 1 year ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.