转载 http://hi.baidu.com/nutchen/blog/item/e942a7016dd2c6071c9583d3.html
项目中碰到的情况,居然产生了20多G,把硬盘占满、服务Down掉。原因可能:出现过多内存泄漏,或者分配过多大内存等。解决方法:
1、进入was管理控制台,选择 应用程序服务器 > server1 > 进程定义 > Java 虚拟机,将"最大堆大小"改为768或1024以上(跟机器内存相关,你的机器最好有较大内存)。保存。
2、优化你的程序,减少要求分配较大内存的设计,优化数据连接池。
3、给was打补丁。ibm网站上有相关补丁下载,不过最好升级到同系列的最新版本
4、修改启动文件,使之不产生这些文件,设置如下:
export IBM_HEAP_DUMP=false
export IBM_HEAPDUMP=false
export IBM_HEAPDUMP_OUTOFMEMORY=false
export IBM_JAVACORE_OUTOFMEMORY=false
分析以上4中方法,只有方法2才是根本解决之道。
针对4,IBM网站上有详细阐述,特附如下:
Out of Memory (Java heap) specific MustGather information
Set up for enabling heap dump file generation:
- For releases of V6.0:
- To set the Environment Entries from the administrative console, select the following:
Servers > Application Servers > server_name > Java and Process Management > Process Definition > Environment Entries > New
- Add the following Name and Value pairs:
IBM_HEAPDUMP |
true |
IBM_HEAP_DUMP |
true |
IBM_HEAPDUMPDIR |
your_directory |
IBM_HEAPDUMP_OUTOFMEMORY |
true |
IBM_JAVADUMP_OUTOFMEMORY |
true |
IBM_JAVA_HEAPDUMP_TEXT |
true |
个人建议:在生产环境当中,当应用发生oom 或者 ha 情况下都设置成true,正常情况下设置成false
3. Make sure that you save changes to the master configuration.
- For release V5.1.1:
- To set the Environment Entries from the administrative console, select the following:
Servers > Application Servers > server_name > Process Definition > Environment Entries > New
- Add the following Name and Value pairs:
IBM_HEAPDUMP |
true |
IBM_HEAP_DUMP |
true |
IBM_HEAPDUMPDIR |
your_directory |
IBM_HEAPDUMP_OUTOFMEMORY |
true |
IBM_JAVADUMP_OUTOFMEMORY |
true |
IBM_JAVA_HEAPDUMP_TEXT |
true |
|
|
- Make sure that you save changes to the master configuration.
For releases of V5.0 and V5.1.0:
- To set the Environment Entries from the administrative console, select the following:
Servers > Application Servers > server_name > Process Definition > Environment Entries > New
- Add the following Name and Value pairs:
IBM_HEAPDUMP |
true |
IBM_HEAP_DUMP |
true |
IBM_HEAPDUMPDIR |
your_directory |
IBM_HEAPDUMP_OUTOFMEMORY |
true |
IBM_JAVADUMP_OUTOFMEMORY |
true |
|
|
- Make sure that you save changes to the master configuration.
- For releases of V4.0:
- To enable the heap dump, add the following lines to the top of the adminserver.bat file in the install_root/bin directory, after the call to setupCmdLine.bat:
call "%~dp0setupCmdLine.bat" set IBM_HEAPDUMP=true set IBM_HEAP_DUMP=true set IBM_HEAPDUMP_OUTOFMEMORY=true set IBM_JAVADUMP_OUTOFMEMORY=true set IBM_HEAPDUMPDIR=directory_path |
|
- When you start the administrative server, use the modified adminserver.bat file from a command prompt instead of using the Services panel.
- Notes:
- The heap dump is written to the current directory, install_root/bin, or the directory specified by the IBM_HEAPDUMPDIR environment variable.
- The file that is generated is called heapdumppid.time in internal format txt. This file can be very large; allow for at least the maximum heap size. If the maximum heap is set to 512 MB, allow for .5 GB for the dump.
- Any version of WebSphere Application Server that is using the IBM JDK 1.3.1 SR5 or higher, and 1.4.X, will automatically generate heapdump and javacore files on an OutOfMemory condition. Adding the additional parameters will give you the option to manually generate heapdumps and also specify the directory in which to write the heapdump files. To manually generate heapdumps you will need to issue the WSADMIN command to generate javacore*.txt file. This will also produce a heapdump*.txt file.
When failure occurs:
- This mechanism uses the same signal handler as javacore processing, so do not have DISABLE_JAVADUMP set as an environment variable.
- Follow instructions on enabling verbosegc in WebSphere Application Server.
- Delete all Application Server and FFDC log files, if possible. Back them up, if needed.
- Restart the Application Server.
- Wait for the OutOfMemoryError condition to occur. This should cause the generation of a heapdump.
- If you want to analyze the heapdump yourself, follow instructions to use IBM HeapAnalyzer tool for analyzing JVM heap usage. If you do not want to analyze this yourself, proceed to step 8.
- Collect the following files:
- For releases of V6.0:
- The server.xml file located in the following directory:
install_root\profiles\profile_name\config\cells\ cell_name\nodes\node_name\servers\server_name |
|
- Everything in the following directory:
install_root\profiles\profile_name\logs\server_name |
Specifically, the following logs are needed:
- systemErr
- systemOut
- native_stderr
- native_stdout
- heapdump*.txt or heapdump*.phd
- javacore*.txt
|
- Everything in the following directory:
install_root\profiles\profile_name\logs\ffdc |
|
- All documents requested For all releases below.
- For releases of V5.0 and V5.1:
- The server.xml file located in the following directory:
install_root\config\cells\nodes\node_name\servers\server_name |
Specifically, the following logs are needed:
- systemErr
- systemOut
- native_stderr
- native_stdout
- heapdump*.txt or heapdump*.phd
- javacore*.txt
|
- Everything from the following directory:
install_root\logs\server_name |
|
- Everything from the following directory:
- All documents requested For all releases below.
- For releases of V4.0 and V3.5:
- A XMLConfig full export.
- Everything from the following directory:
install_root\logs |
Specifically, the following log files are needed:
- stderr
- stdout
- tracefile
- heapdump*.txt
- javacore*.txt
|
- All documents requested For all releases below.
- For all releases
- All javacore*.txt files that were created when OutOfMemory conditions occurred. If javacore*.txt files were created, you can find them in the install_root, install_root\bin or in the configured working directory.
- Include the Application Server systemErr, systemOut, native_stderr, and native_stdout logs, if they are located in a different directory.
- List of all other software and version information on the system. For example, any databases, WebSphere MQ, and so forth.
- Follow instructions to send diagnostic information to IBM support.
分享到:
相关推荐
websphere javacore与heapdump文件分析工具,jca是javacore分析工具,ha是heapdump分析工具,需要用jdk1.6打开
webshpere在内存溢出的时候会产生heapdumpdump文件,通过这个工具可以分析这些文件。
ibm websphere 服务器内存溢出或其他故障,生成heapdump,分析工具
websphere在内存溢出的时候会产生javacore文件,分析这个文件可以看出cpu的使用情况。
Websphere dump文件分析工具JCA
软件介绍: IBM websphere 服务器出现内存溢出或其他故障时,会生成heapdump文件,本工具用于分析heapdump,查找错误原因。运行IBN WEBSPHERE HEAPDUMP需要安装JDK1.8框架。
heapdump分析工作heapanalyzer的使用及工具 java -Xmx1000m -jar ha443.jar
java IBM websphere 内存溢出 javacore deapdump CPU内存分析工具
Websphere javacore文件分析工具.
IBM WebSphere Heap Dump Analyzer
websphere 内存溢出 javacore分析工具jca456 分析javacore的好工具 分析javacore的好工具
IBM WebSphere Javacore分析工具
ibm websphere 服务器内存溢出或其他故障,生成javacore,分析工具
该工具用于分析WebSphere宕机时产生的javacore日志,从而解决问题。
IBM出的一款堆内存对象分析ha(heap analyser)工具,可以用来分析websphere生成的内存转储phd格式文件。 使用方法 1.下载ha457.jar 2.java -Xmx4g -jar ha456.jar 3.打开heapdump.phd 4.他就会显示下面的图片,出现...
websphere javacore 分析工具 jca412
在使用Websphere或者weblogic Server进行Web开发的时候,会经常出现CPU 100%或者OOT问题,这是需要分析javacore,而这工具很方便的进行分析
websphere 内存溢出 javacore分析工具jca401 分析javacore的好工具 分析javacore的好工具
该文档整合了网上所有的关于描述was(webSphere)下生成许多phd文件的描述,生成的该文件占用了大量的存储空间,不及时清理很可能导致程序报错,如上传文件上传不了等问题。产生该类文件的原因包括JVM设置的最小内存...
当websphere application server 发生崩溃时默认会在profile 文件夹下面生产heapdump 文件,利用此工具有助于分析发生崩溃原因