informatica:weblogic:heapdump
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
informatica:weblogic:heapdump [2013/08/19 10:35] – [Eclipse Memory Analizer] jose | informatica:weblogic:heapdump [2019/01/22 08:44] (current) – [Eclipse Memory Analizer] javi | ||
---|---|---|---|
Line 1: | Line 1: | ||
====== HeapDump ====== | ====== HeapDump ====== | ||
+ | Hacer un heapdump en caliente. Para la JVM y el servidor de aplicaciones no responde a peticiones: | ||
jmap -dump: | jmap -dump: | ||
+ | | ||
+ | Añadir el siguiente parámetro para que haga un heapdump cuando hay un out of memory OOM: | ||
+ | < | ||
+ | -XX: | ||
+ | </ | ||
+ | Se puede añadir en caliente. Primero miramos si lo tiene activado. Nos tenemos que fijar en el sigo - + delante de Heap: | ||
+ | < | ||
+ | # jinfo -flag HeapDumpOnOutOfMemoryError <PID> | ||
+ | | ||
+ | -XX: | ||
+ | </ | ||
+ | En este caso tiene un signo - que quiere decir que no lo tiene activado. Lo activamos poniendo el signo +: | ||
+ | # jinfo -flag +HeapDumpOnOutOfMemoryError <PID> | ||
+ | | ||
+ | Comprobamos que lo tiene activado: | ||
+ | < | ||
+ | # jinfo -flag HeapDumpOnOutOfMemoryError <PID> | ||
+ | | ||
+ | -XX: | ||
+ | </ | ||
+ | ====== Generar Heap Dump ====== | ||
+ | Con la aplicación de Hello World y una instancia de -Xms128m -Xmx128m de weblogic, lanzamos un test de Jmeter de 100 Threads con un Loop Count de 10.000 por ejemplo. A mi me ha generado el HeapDump con formato: jrockit_< | ||
+ | |||
+ | |||
| | ||
====== Analizar ====== | ====== Analizar ====== | ||
===== Eclipse Memory Analizer ===== | ===== Eclipse Memory Analizer ===== | ||
+ | |||
./ | ./ | ||
Line 14: | Line 40: | ||
</ | </ | ||
- | ==== Heap Analyzer (IBM) ==== | + | Para indagar el " |
+ | |||
+ | https:// | ||
+ | |||
+ | 1. Abrir el archivo " | ||
+ | |||
+ | 2. Tras muuuucho tiempo se abirá el informe | ||
+ | |||
+ | 3. Click en el icono con los engranajes tipo " | ||
+ | |||
+ | 4. Click encima del " | ||
+ | |||
+ | 5. En la parte izquierda identificar " | ||
+ | |||
+ | < | ||
+ | Type|Name | ||
+ | -------------------------------------------------------------------------------- | ||
+ | ref |contextClassLoader|com.ibm.ws.classloader.CompoundClassLoader @ 0x6ffd0bb40 | ||
+ | -------------------------------------------------------------------------------- | ||
+ | </ | ||
+ | |||
+ | 6. Situar el ratón encima, botón derecho, "Go into" | ||
+ | |||
+ | 7. En la parte izquierda identificar " | ||
+ | |||
+ | < | ||
+ | Type|Name|Value | ||
+ | ------------------------------------------------------- | ||
+ | ref |name|war: | ||
+ | ------------------------------------------------------- | ||
+ | </ | ||
+ | |||
+ | A partir de aquí la documentación sugiere indicar el .war (o .ear) al desarrollador y que mire | ||
+ | |||
+ | ====== Error: out of memory ====== | ||
+ | |||
+ | https:// | ||
+ | |||
+ | Solución: | ||
+ | |||
+ | 1. Editar el .ini: | ||
+ | |||
+ | < | ||
+ | vim / | ||
+ | </ | ||
+ | |||
+ | Y añadir al final: | ||
+ | |||
+ | < | ||
+ | -vmargs | ||
+ | -Xmx14g | ||
+ | -XX: | ||
+ | </ | ||
+ | |||
+ | En este ejemplo se estable el límite de consumo de memoria RAM para la aplicación MAT en 14 GB. | ||
+ | |||
+ | 2. Volver a arrancar MAT | ||
+ | ===== Heap Analyzer (IBM) ===== | ||
java -jar ha447.jar | java -jar ha447.jar | ||
Saca un árbol de los sospechosos de memory leak | Saca un árbol de los sospechosos de memory leak | ||
informatica/weblogic/heapdump.1376908533.txt.gz · Last modified: 2015/04/13 20:19 (external edit)