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
[ ] Bug fix (non-breaking change which fixes an issue)
[x] New feature (non-breaking change which adds functionality)
[ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
[ ] This change requires a documentation update
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"
......
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.
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.
Checklist: