Prezados,
Preciso da ajuda de vocês, ou seja, um problema que esta sendo uma boa dor de cabeça para mim (Primeiro POST).
Estou com o Glassfish 3.1 no Windows Server 2003 32 bits, mas por algum motivo o mesmo cai do nada.
Teoricamente não esta relacionado ao logoff.
Segue erro:
#
# There is insufficient memory for the Java Runtime Environment to continue.
# Native memory allocation (malloc) failed to allocate 32756 bytes for ChunkPool::allocate
# Possible reasons:
# The system is out of physical RAM or swap space
# In 32 bit mode, the process size limit was hit
# Possible solutions:
# Reduce memory load on the system
# Increase physical memory or swap space
# Check if swap backing store is full
# Use 64 bit Java on a 64 bit OS
# Decrease Java heap size (-Xmx/-Xms)
# Decrease number of Java threads
# Decrease Java thread stack sizes (-Xss)
# Set larger code cache with -XX:ReservedCodeCacheSize=
# This output file may be truncated or incomplete.
#
# Out of Memory Error (allocation.cpp:211), pid=2092, tid=140
#
# JRE version: 6.0_25-b06
# Java VM: Java HotSpot(TM) Server VM (20.0-b11 mixed mode windows-x86 )
--------------- T H R E A D ---------------
Current thread (0x6825a800): JavaThread "C2 CompilerThread0" daemon [_thread_in_native, id=140, stack(0x68340000,0x68390000)]
Stack: [0x68340000,0x68390000], sp=0x6838e810, free space=314k
Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
Procurei em diversos sites algum assunto e não encontrei nada relacionado.
Fiz pequenas alterações no intuito de performance, segue para agregar caso alguem possa me ajudar:
<java-config debug-options="-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=9009" system-classpath="" classpath-suffix="">
<jvm-options>-Djava.security.policy=${com.sun.aas.instanceRoot}/config/server.policy</jvm-options>
<jvm-options>-Dosgi.shell.telnet.maxconn=1</jvm-options>
<jvm-options>-Dfelix.fileinstall.disableConfigSave=false</jvm-options>
<jvm-options>-Dfelix.fileinstall.poll=5000</jvm-options>
<jvm-options>-XX:NewRatio=2</jvm-options>
<jvm-options>-Djava.endorsed.dirs=${com.sun.aas.installRoot}/modules/endorsed${path.separator}${com.sun.aas.installRoot}/lib/endorsed</jvm-options>
<jvm-options>-Dosgi.shell.telnet.port=6666</jvm-options>
<jvm-options>-Dcom.sun.enterprise.config.config_environment_factory_class=com.sun.enterprise.config.serverbeans.AppserverConfigEnvironmentFactory</jvm-options>
<jvm-options>-Djava.ext.dirs=${com.sun.aas.javaRoot}/lib/ext${path.separator}${com.sun.aas.javaRoot}/jre/lib/ext${path.separator}${com.sun.aas.instanceRoot}/lib/ext${path.separator}${com.sun.aas.instanceRoot}/lib/ext/relatorio</jvm-options>
<jvm-options>-Xss128k</jvm-options>
<jvm-options>-XX:+UseParallelOldGC</jvm-options>
<jvm-options>-XX:+DisableExplicitGC</jvm-options>
<jvm-options>-Dgosh.args=--nointeractive</jvm-options>
<jvm-options>-Djavax.management.builder.initial=com.sun.enterprise.v3.admin.AppServerMBeanServerBuilder</jvm-options>
<jvm-options>-Dcom.sun.enterprise.security.httpsOutboundKeyAlias=s1as</jvm-options>
<jvm-options>-XX:MaxPermSize=512m</jvm-options>
<jvm-options>-XX:+UnlockDiagnosticVMOptions</jvm-options>
<jvm-options>-XX:ParallelGCThreads=2</jvm-options>
<jvm-options>-Xmx1024m</jvm-options>
<jvm-options>-Dfelix.fileinstall.bundles.startTransient=true</jvm-options>
<jvm-options>-Dfelix.fileinstall.dir=${com.sun.aas.installRoot}/modules/autostart/</jvm-options>
<jvm-options>-Dfelix.fileinstall.bundles.new.start=true</jvm-options>
<jvm-options>-Djava.security.auth.login.config=${com.sun.aas.instanceRoot}/config/login.conf</jvm-options>
<jvm-options>-XX:+AggressiveHeap</jvm-options>
<jvm-options>-Dosgi.shell.telnet.ip=127.0.0.1</jvm-options>
<jvm-options>-Dfelix.fileinstall.log.level=2</jvm-options>
<jvm-options>-Dorg.glassfish.additionalOSGiBundlesToStart=org.apache.felix.shell,org.apache.felix.gogo.runtime,org.apache.felix.gogo.shell,org.apache.felix.gogo.command</jvm-options>
<jvm-options>-Xms512m</jvm-options>
<jvm-options>-Djavax.net.ssl.keyStore=${com.sun.aas.instanceRoot}/config/keystore.jks</jvm-options>
<jvm-options>-server</jvm-options>
<jvm-options>-Djdbc.drivers=org.apache.derby.jdbc.ClientDriver</jvm-options>
<jvm-options>-Djavax.net.ssl.trustStore=${com.sun.aas.instanceRoot}/config/cacerts.jks</jvm-options>
<jvm-options>-DANTLR_USE_DIRECT_CLASS_LOADING=true</jvm-options>
</java-config>
O erro sugere baixar o heap, mas já estou com um valor teoricamente pequeno.
Alguem já passou por isso? Alguem conhece algum tutorial sugerinco um bom tuning para Glassfish 3.1 rodando no Windos Server 2003?
Caso alguem possa me ajuda agradeço, pois preciso deixar esse cara estavel.
Obs.: Caso alguem domine o equilibrio entre o Xmx, Xms, e Heap, pois a configuração inclusa foi baseado em leituras onde citava como boas praticas.
Os ajustes foram:
<jvm-options>-Xss128k</jvm-options>
<jvm-options>-XX:+UseParallelOldGC</jvm-options>
<jvm-options>-XX:+DisableExplicitGC</jvm-options>
<jvm-options>-XX:ParallelGCThreads=2</jvm-options>
<jvm-options>-Xmx1024m</jvm-options>
<jvm-options>-XX:+AggressiveHeap</jvm-options>
<jvm-options>-Xms512m</jvm-options>
<jvm-options>-server</jvm-options>
Valeu,
ASPeiro