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

标签 java jsp websphere

我们有一个部署在 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/

相关文章:

java - Clearcase View 创建向导中的两个 View 具有相同的存储目录吗?

java - 为什么复制任务中的 gradle 排除模式不起作用?

java - 使用 ModelMapper 将 DTO 映射到实体(包括异常)

java - session 持久性与值(value)栈维护之间的区别

java - 使用 jSTL 替换 ("\"", "“") 方法替代

java - Struts 2 验证方法在没有 XML 的情况下无法工作

websphere - 使用 maven 3 在 Websphere 8.5 上部署 Web 应用程序

java - IIS 在性能和可伸缩性方面与企业 Web 应用程序的 weblogic 和 websphere 相比如何?

java - 如何更新SWT表中特定行的数据

java - 从 spring mvc 设置一个选择框值