Skip to content

[BUG] ResourceMonitor Incorrectly Triggers Unhealthy Status Despite Recyclable Memory #3981

@qianheng-aws

Description

@qianheng-aws

static class MemoryUsage {
public long usage() {
final long freeMemory = Runtime.getRuntime().freeMemory();
final long totalMemory = Runtime.getRuntime().totalMemory();
return totalMemory - freeMemory;
}

ResourceMonitor get the memory usage by using total memory - free memory. While the whole process of a query(even other queries previous to the current one) will accumulate the memory usage until GC.

Originally posted by @qianheng-aws in #3971 (comment)

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

Status

Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions