Skip to content
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

[Bug] 内存泄漏问题 #546

Open
sizuoyi00 opened this issue May 29, 2023 · 0 comments
Open

[Bug] 内存泄漏问题 #546

sizuoyi00 opened this issue May 29, 2023 · 0 comments

Comments

@sizuoyi00
Copy link

sizuoyi00 commented May 29, 2023

Description
使用多租户中的内存资源隔离限制,代码如下,近期发现有内存溢出现象,4g内存,jvm堆内存1254m,泄漏内存300m+
经过定位发现com.alibaba.tenant.TenantContainer#destroy方法,没有释放ResourceContainerMonitor中的resourceContainerMap

dragonwell 8.13.14

启动参数 -XX:+MultiTenant -XX:+TenantHeapThrottling -XX:+TenantHeapIsolation -Xms1254m -Xmx1254m -XX:-ExitOnOutOfMemoryError

image

代码会多次创建容器并销毁
public Runnable submit2TenantContainer(FutureTask futureTask) {
return () -> {
TenantContainer limiter = TenantContainer.create(new TenantConfiguration().limitHeap(256 * 1024 * 1024));
try {
limiter.run(futureTask);
} catch (TenantException e) {
futureTask.cancel(true);
} finally {
limiter.destroy();
}
};
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant