【问题标题】:okhttp3 memory high after stress test with http2okhttp3 使用 http2 进行压力测试后内存高
【发布时间】:2021-02-05 08:08:35
【问题描述】:

对不起,我正在使用 http2 和 okhttp3 作为库进行压力测试 我正在使用 JMeter 作为测试工具 我的线程是 200 到 300 秒,并在 30 秒内增加

我使用 docker 作为平台 压测后内存高升8GB永不下降 我已经用过这样的代码了

> client.dispatcher().executorService().shutdown();
> client.connectionPool().evictAll();

并且已经为我的 okhttpclient 使用单例

但还是没有下去 有什么我想念的吗?

谢谢

【问题讨论】:

    标签: spring memory okhttp http2


    【解决方案1】:

    通常 JVM 程序在进程退出之前从不释放内存。这是内存管理方式的副作用。

    【讨论】:

    • 所以你的意思是我必须关闭我的程序然后释放内存?
    猜你喜欢
    • 2011-04-28
    • 1970-01-01
    • 2011-12-08
    • 2012-06-05
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2014-09-30
    • 1970-01-01
    相关资源
    最近更新 更多