java 内存泄漏 weblogic AES 充气城堡

发布于 2024-11-17 06:29:53 字数 897 浏览 2 评论 0原文

我在 WebLogic 上部署了 Web 服务,它利用充气城堡进行 AES 256 位解密。这会导致内存泄漏。我得到的一些日志是这些,

--------- Detailed Heap Statistics: ---------
26.9% 429099k 13731188 +429099k java/util/LinkedHashMap$Entry
16.2% 258003k  2969579 +258003k [C
11.0% 175144k  3202651 +175144k java/security/Provider$Service
10.7% 170955k  7294115 +170955k java/util/Hashtable$Entry
 9.5% 152003k  6485501 +152003k java/security/Provider$ServiceKey
 8.3% 132945k    61545 +132945k [Ljava/util/HashMap$Entry;
 4.6% 72660k  3100166 +72660k java/lang/String
 3.1% 49413k    20140 +49413k [Ljava/util/Hashtable$Entry;
 3.0% 47766k  1504343 +47766k [Ljava/lang/Object;
 2.2% 34712k  1481059 +34712k java/util/ArrayList
 0.6% 10035k    29012 +10035k [B
     1593352kB total ---

--------- End of Detailed Heap Statistics ---

我知道这还不够。对此感到抱歉。谁能解释一下为什么会发生内存泄漏吗?我对 java/security/Provider$ServiceKey 的内存泄漏特别感兴趣。 提前致谢。

I have web service deployed on WebLogic which utilizes the bouncy castle to do a AES 256 bit decryption. This is causing a memory leak. A few logs which I have got are these

--------- Detailed Heap Statistics: ---------
26.9% 429099k 13731188 +429099k java/util/LinkedHashMap$Entry
16.2% 258003k  2969579 +258003k [C
11.0% 175144k  3202651 +175144k java/security/Provider$Service
10.7% 170955k  7294115 +170955k java/util/Hashtable$Entry
 9.5% 152003k  6485501 +152003k java/security/Provider$ServiceKey
 8.3% 132945k    61545 +132945k [Ljava/util/HashMap$Entry;
 4.6% 72660k  3100166 +72660k java/lang/String
 3.1% 49413k    20140 +49413k [Ljava/util/Hashtable$Entry;
 3.0% 47766k  1504343 +47766k [Ljava/lang/Object;
 2.2% 34712k  1481059 +34712k java/util/ArrayList
 0.6% 10035k    29012 +10035k [B
     1593352kB total ---

--------- End of Detailed Heap Statistics ---

I know this is not enough information. Sorry about that. Can anyone why is this memory leak happening? I am particularly interested in memory leak dude to java/security/Provider$ServiceKey.
Thanks in advance.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

两个我 2024-11-24 06:29:53

如果有什么区别,请尝试静态安装提供程序。

要静态安装提供程序,您需要将其作为条目添加到 java.security 文件中,该文件位于 $JAVA_HOME/jre/lib/security/java.security您正在使用的 JRE/JDK 的文件夹。在文件中查找包含 security.provider.X 的行列表,其中 X 是某个数字。在列表底部添加以下行:

security.provider.N=org.bouncycastle.jce.provider.BouncyCastleProvider

Try installing the provider statically if that makes any difference.

To install the provider statically, you need to add it as an entry to the java.security file, found in the $JAVA_HOME/jre/lib/security/java.security folder of the JRE/JDK you are using. Look for a list of lines in the file with security.provider.X where X is some number. At the bottom of the list add the line:

security.provider.N=org.bouncycastle.jce.provider.BouncyCastleProvider
忘东忘西忘不掉你 2024-11-24 06:29:53

我有一个类似的问题 width BouncyCastleProvider,我可以解决它 width this。

private static BouncyCastleProvider bouncycastleprovider = null;

public static synchronized BouncyCastleProvider getInstance () {

    if (bouncycastleprovider == null) {
        bouncycastleprovider = new BouncyCastleProvider();
    }
    return bouncycastleprovider;
}

I had a similar problem width BouncyCastleProvider, and I could solve it width this.

private static BouncyCastleProvider bouncycastleprovider = null;

public static synchronized BouncyCastleProvider getInstance () {

    if (bouncycastleprovider == null) {
        bouncycastleprovider = new BouncyCastleProvider();
    }
    return bouncycastleprovider;
}
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文