Como eu defino “MaxPermSize” para Atlassian Fisheye / Crucible sendo executado como serviço no Win2k3?

1

Eu tenho tentado configurar o Atlassian Fisheye / Crucible como um serviço no Win 2K3 R2 por duas semanas. Eu continuo recebendo vários erros "java.lang.OutOfMemoryError: PermGen space", que travam Fisheye e me forçam a reiniciar o serviço.

Eu segui o exemplo no site de suporte da Atlassian para configurar o MaxPermSize dentro do serviço embrulho. No entanto, quando eu verifico o SysInfo dentro das páginas do Fisheye Admin e do log de depuração, não vejo nenhuma confirmação. A informação do Java Heap está em ambos os lugares, então eu esperaria que a configuração MaxPermSize aparecesse em ambos os lugares.

O erro está persistindo e o suporte da Atlassian tem sido de pouca ajuda.

Agradeço qualquer ajuda.

    
por Jeremy 21.12.2010 / 04:11

1 resposta

1

Você pode definir isso no seu arquivo Wrapper.conf. Aqui está o meu arquivo de configuração e isso está funcionando muito bem para mim, estou usando isso com o Fisheye 2.6.3 em execução no Windows Server 2008 R2. Este arquivo é praticamente idêntico ao exemplo / configuração padrão, com algumas adições importantes que comentarei no final.

#********************************************************************
# Wrapper Properties
#********************************************************************
# Working Directory
wrapper.working.dir=../../

# Java Application
wrapper.java.command=C:\Program Files\Java\jdk1.6.0_25\bin\java.exe

# Java Main class.  This class must implement the WrapperListener interface
#  or guarantee that the WrapperManager class is initialized.  Helper
#  classes are provided to do this for you.  See the Integration section
#  of the documentation for details.
wrapper.java.mainclass=com.cenqua.fisheye.FisheyeServiceWrapper

# Java Classpath (include wrapper.jar)  Add class path elements as
#  needed starting from 1 (add lib FIRST so that log4j config gets loaded first)
wrapper.java.classpath.1=./fisheyeboot.jar
wrapper.java.classpath.2=wrapper/lib/*.jar

# Java Library Path (location of Wrapper.DLL or libwrapper.so)
wrapper.java.library.path.1=wrapper/lib
wrapper.java.library.path.2=lib/native/linux-i386
wrapper.java.library.path.3=lib/native/osx-ppc
wrapper.java.library.path.4=lib/native/solaris-sparc
wrapper.java.library.path.5=lib/native/win32-x86


# Java Additional Parameters
wrapper.java.additional.1=-server
wrapper.java.additional.2=-showversion
wrapper.java.additional.3=-Djava.awt.headless=true

# JDK 1.5 Additional Parameters for jmx
wrapper.java.additional.4=-Dcom.sun.management.jmxremote
wrapper.java.additional.5=-Dcom.sun.management.jmxremote.port=4242
wrapper.java.additional.6=-Dcom.sun.management.jmxremote.authenticate=false
wrapper.java.additional.7=-Dcom.sun.management.jmxremote.ssl=false
wrapper.java.additional.8=-Dcom.sun.management.jmxremote.authenticate=false
wrapper.java.additional.9=-Dcom.sun.management.jmxremote.password.file=./wrapper/jmxremote.password
wrapper.java.additional.10=-Dwrapper.mbean.name="wrapper:type=Java Service Wrapper Control"
wrapper.java.additional.11=-Dfisheye.inst="C:\Atlassian\fecru-2.6.3\bin\.."
wrapper.java.additional.12=-XX:MaxPermSize=256m
wrapper.java.additional.13=-Xrs 
wrapper.java.additional.14=-Dfile.encoding=UTF-8


# Initial Java Heap Size (in MB)
wrapper.java.initmemory=64

# Maximum Java Heap Size (in MB)
wrapper.java.maxmemory=1024

# Application parameters.  Add parameters as needed starting from 1
# The first application parameter is the name of the class whose main
# method is to be called when the application is launched.  The class
# name is followed by the number of parameters to be passed to its main
# method.  Then comes the actual parameters.

wrapper.app.parameter.1=com.cenqua.fisheye.FishEyeCtl
wrapper.app.parameter.2=1
wrapper.app.parameter.3=start

# The start parameters are followed by the name of the class whose main
# method is to be called to stop the application.  The stop class name
# is followed by a flag which controls whether or not the Wrapper should
# wait for all non daemon threads to complete before exiting the JVM.
# The flag is followed by the number of parameters to be passed to the
# stop class's main method.  Finally comes the actual parameters.
wrapper.app.parameter.4=com.cenqua.fisheye.FishEyeCtl
wrapper.app.parameter.5=true
wrapper.app.parameter.6=1
wrapper.app.parameter.7=stop

#********************************************************************
# Wrapper Logging Properties
#********************************************************************
# Format of output for the console.  (See docs for formats)
wrapper.console.format=M

# Log Level for console output.  (See docs for log levels)
wrapper.console.loglevel=INFO

# Log file to use for wrapper output logging.
wrapper.logfile=var/log/wrapper.log

# Format of output for the log file.  (See docs for formats)
wrapper.logfile.format=LPTM

# Log Level for log file output.  (See docs for log levels)
wrapper.logfile.loglevel=INFO

# Maximum size that the log file will be allowed to grow to before
#  the log is rolled. Size is specified in bytes.  The default value
#  of 0, disables log rolling.  May abbreviate with the 'k' (kb) or
#  'm' (mb) suffix.  For example: 10m = 10 megabytes.
wrapper.logfile.maxsize=50m

# Maximum number of rolled log files which will be allowed before old
#  files are deleted.  The default value of 0 implies no limit.
wrapper.logfile.maxfiles=10

# Log Level for sys/event log output.  (See docs for log levels)
wrapper.syslog.loglevel=NONE

#********************************************************************
# Wrapper Windows Properties
#********************************************************************
# Title to use when running as a console
wrapper.console.title=Fisheye

#********************************************************************
# Wrapper Windows NT/2000/XP Service Properties
#********************************************************************
# WARNING - Do not modify any of these properties when an application
#  using this configuration file has been installed as a service.
#  Please uninstall the service before modifying this section.  The
#  service can then be reinstalled.

# Name of the service
wrapper.ntservice.name=Fisheye

# Display name of the service
wrapper.ntservice.displayname=Fisheye

# Description of the service
wrapper.ntservice.description=Fisheye

# Service dependencies.  Add dependencies as needed starting from 1
wrapper.ntservice.dependency.1=

# Mode in which the service is installed.  AUTO_START or DEMAND_START
wrapper.ntservice.starttype=AUTO_START

# Allow the service to interact with the desktop.
wrapper.ntservice.interactive=false

Linhas notáveis

wrapper.java.command=C:\Program Files\Java\jdk1.6.0_25\bin\java.exe

Caminho completo para o executável do servidor 'hotspot' do JDK. Note, baixe o JDK completo, não apenas o JRE.

wrapper.java.additional.11=-Dfisheye.inst="C:\Atlassian\fecru-2.6.3\bin.."
wrapper.java.additional.12=-XX:MaxPermSize=256m
wrapper.java.additional.13=-Xrs
wrapper.java.additional.14=-Dfile.encoding=UTF-8

Nenhuma das opções acima é mostrada na documentação da Atlassian, eu as adicionei ao longo do tempo por tentativa e erro. Quando o FeCru é iniciado pela primeira vez sob o wrapper de serviço, ele pode parar com um erro de falta de memória, a linha 'MaxPermSize' corrige isso.

Também descobri que é necessário especificar FISHEYE_INST como mostrado acima. Eu não tenho idéia porque o caminho é especificado com /.. no final, foi assim no exemplo que encontrei. Algum ritual linux, sem dúvida. As outras linhas, não consigo lembrar para que servem, mas adicionei-as por algum motivo ou outro e não documentei por quê. Ninguém é perfeito; -)

wrapper.java.initmemory=64 wrapper.java.maxmemory=1024

As alocações de memória de heap aumentaram em relação aos padrões - indexei alguns repositórios bastante carnudos e pude arcar com os recursos extras - você pode obter as alocações menores padrão.

    
por 18.08.2011 / 16:21