gpt4 book ai didi

java - IBM WAS 8.5 出错时重新启动

转载 作者:行者123 更新时间:2023-12-01 09:34:32 24 4
gpt4 key购买 nike

我们有一个部署在 WAS 7.5 上的应用程序,它会遇到堆内存不足异常问题,它会自动重新启动。将其迁移到 WAS 8.5 并出现相同错误后,它不会重新启动。这是 WAS 8.5 的已知问题还是需要为 WAS 8.5 设置一些配置选项?

该应用程序是使用 java/JSP 构建的。我们正在努力修复应用程序上的内存泄漏。我们还需要解决上面的配置问题。

如果需要更多信息,请告诉我,我将编辑发布的问题。

最佳答案

我知道这是jdk上的一个函数。 java 运行时有一个参数用于在 OOM 情况下运行脚本。请参阅http://docs.oracle.com/javase/8/docs/technotes/tools/windows/java.html#BABCBGHF

-XX:OnOutOfMemoryError:

-XX:OnOutOfMemoryError=string

Sets a custom command or a series of semicolon-separated commands to run when an OutOfMemoryError exception is first thrown. If the string contains spaces, then it must be enclosed in quotation marks. For an example of a command string, see the description of the -XX:OnError option.

-XX:OnError=string

Sets a custom command or a series of semicolon-separated commands to run when an irrecoverable error occurs. If the string contains spaces, then it must be enclosed in quotation marks.

The following example shows how the -XX:OnError option can be used to run the userdump.exe utility to obtain a crash dump in case of an irrecoverable error (the %p designates the current process):

-XX:OnError="userdump.exe %p"

The preceding example assumes that the path to the userdump.exe utility is specified in the PATH environment variable.

关于java - IBM WAS 8.5 出错时重新启动,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/39118283/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com