Memory setting & JVM option
FishEye uses FISHEYE_OPTS environment variable to pass parameters to the Java Virtual Machine (JVM) used to run FishEye. It is used to set the Java heap size available to FishEye/Crucible.
JVM options that commonly used in FishEye & Crucible
Option |
Description |
Example |
|---|---|---|
-Xmx |
To specify the maximum heap size. Use this when FishEye/Crucible requires more memory. |
|
-Xrs |
To prevent the JVM closing when an interactive user logs out if FishEye running as a service under Windows |
|
-XX:+HeapDumpOnOutOfMemoryError |
Generate a heap dump when an allocation from the Java heap or the permanent generation cannot be satisfied |
|
Common Problems
Error: When adding a new repository and on the initial scan, you may receive messages similar to this in the logs:
org.tigris.subversion.javahl.ClientException: svn: Java heap space
Error: FishEye faced several issue running with jrockit JDK. It is advisable to use Sun JVM instead.
Error: All kinds of error messages could be shown in FishEye when JVM running out of memory.
Troubleshoot
- Config.xml configuration file (located at FISHEYE_INST\ directory)
- The resulting log file (located at FISHEYE_INST\var\log) after start FishEye with --debug and --debug -perf swithces.
- Check for memory leak - Heap dump file: The heap dump is in HPROF binary format, and so it can be analyzed using any tools that can import this format. For example, the jhat tool can be used to do rudimentary analysis of the dump. See jhat Utility.
Solution for Memory Problems
- Solution:* Suggesting client to set FISHEYE_OPTS environment variables, like:
- The Java heap space needs to be increased. Recommended size is 512Mb - 1024Mb.
- Please take note that environment variables are not handled when starting FishEye with Java Service Wrapper, the configurations have to make within the wrapper.conf file.
- For memory leak - raise a JAC. Require developer to fix.
Example
Procedures on setting environment variables, using FISHEYE_OPTS in the 'Variable name' field, and using the following 'Variable value':
FISHEYE_OPTS=-Xmx512m
This would give FishEye a 512 MByte memory. (FishEye restart is required)
Under Linux console, type the following:
export FISHEYE_OPTS=-Xmx512m
For FishEye started with Java Service Wrapper, modify the Wrapper configuration file located at wrapper/conf/wrapper.conf:
# Maximum Java Heap Size (in MB) wrapper.java.maxmemory=512
Set the option to run in boot or in FishEye startup script.
| Useful Information FishEye will reserve a portion of the available heap for caching database data. Setting the memory impact FishEye performance. |