FishEye Documentation

FishEye 3.7 Documentation
FishEye 3.6 Documentation

FishEye 3.5 Documentation

More...  

 

FishEye Knowledge Base Resources

You're visiting the Fisheye and Crucible Knowledge Base. Visit the FishEye and Crucible Knowledge Base Home for an overview.

Skip to end of metadata
Go to start of metadata

I am getting Out of Memory errors, how can I allocate more memory to FishEye?

Since the default memory setting usually is around 64MB or 128MB, you might have to adjust the settings to run a bigger FishEye instance with sufficient memory.


On this page:

Before you begin, if running FishEye as a Windows Service

If you are running Fisheye/Crucible as a windows service, increasing memory needs to be done in the wrapper.conf file instead of the FISHEYE_OPTS environment variable. Refer to Running FishEye as a Windows Service under Setting FishEye environment variables for Windows Services for instructions.

How to change JVM settings when using FishEye installer

If you are using the new FishEye installer for Windows, up to FishEye 3.4.3 you can edit JVM options using this tool:

http://www.apache.org/dist/commons/daemon/binaries/windows/commons-daemon-1.0.15-bin-windows.zip

To use it, you need to rename "prunmgr.exe" from the zip file to "Atlassian FishEye.exe" or "Atlassian Crucible.exe" depending on which installer you used. Then JVM options such as Xmx and XX:MaxPermSize can be edited on the Java tab.

For FishEye 3.4.4 onwards the tool is included in the installer. You can use it by going to Windows Start Menu > All Programs > FishEye > Configure FishEye. You can edit the options on the Java tab as well.

Ensure to restart FishEye service after changing the JVM parameters.

 

Out Of Memory Errors

There are a number of different memory errors that the JVM will throw. The most common are listed as follows.
In the following, you will be required to set your memory settings via your FISHEYE_OPTS (see the page on Environment variables).
You will need to restart your server after setting your FISHEYE_OPTS.

After having set the FISHEYE_OPTS and restarting your server, go to Administration > Sys Info/Support > System Info, and check your JVM Input Arguments to ensure that your server is picking up your FISHEYE_OPTS as expected.

OutOfMemoryError: Java Heap Space

To solve this error, you will need to add the argument -Xmx1024m to FISHEYE_OPTS, in addition to any argument you use to set the heap size. Often you need to increase the amount of memory allocated to FishEye during the initial scan and period and once this is completed you can reduce back down.

FISHEYE_OPTS="-Xms128m -Xmx1024m -XX:MaxPermSize=256m"

After having set the FISHEYE_OPTS and restarting your server, go to Administration > Sys Info/Support > System Info, and check your JVM Input Arguments to ensure that your server is picking up your FISHEYE_OPTS as expected.

OutOfMemoryError: PermGen space, or Permanent Generation Size

If you get the error message: java.lang.OutOfMemoryError: PermGen space this means that you have exceeded Java's fixed 64MB block for loading class files. You will need to add the argument -XX:MaxPermSize=256m to FISHEYE_OPTS, in addition to any argument you use to set the heap size.

FISHEYE_OPTS="-Xms128m -Xmx512m -XX:MaxPermSize=256m"

After having set the FISHEYE_OPTS and restarting your server, go to Administration > Sys Info/Support > System Info, and check your JVM Input Arguments to ensure that your server is picking up your FISHEYE_OPTS as expected.

OutOfMemoryError: unable to create new native thread

This error occurs when the operating system is unable to create new threads. This is due to the JVM Heap taking up the available RAM.

Big heaps take away from the space that can be allocated for the stack of a new thread

For Linux the maximum heap size of the 32bit JVM cannot be greater than 2GB. If you only have 2GB RAM in your server, it is not recommended to set the Max size of the JVM that high.
The size of the stack per thread can also contribute to this problem. The stack size can reduce the number of threads that can be created.

 

To fix this problem, you should reduce the size of your JVM Heap and also the size of the stack per thread.
The stack size can be changed with the following (example) parameter being added to your FISHEYE_OPTS:

FISHEYE_OPTS="-Xms128m -Xmx1024m -XX:MaxPermSize=256m -Xss512k"

After having set the FISHEYE_OPTS and restarting your server, go to Administration > Sys Info/Support > System Info, and check your JVM Input Arguments to ensure that your server is picking up your FISHEYE_OPTS as expected.

OutOfMemoryError: GC overhead limit exceeded

This error indicates that the JVM took too long to free up memory during its GC process. This error can be thrown from the Parallel or Concurrent collectors.

The parallel collector will throw an OutOfMemoryError if too much time is being spent in garbage collection: if more than 98% of the total time is spent in garbage collection and less than 2% of the heap is recovered, an OutOfMemoryError will be thrown. This feature is designed to prevent applications from running for an extended period of time while making little or no progress because the heap is too small. If necessary, this feature can be disabled by adding the option -XX:-UseGCOverheadLimit to the command line.

This kind of OutOfMemoryError can be caused if your java process is starting to use swapped memory for its heap. This will cause the JVM to take a lot longer than normal to perform normal GC operations. This can eventually cause a timeout to occur and cause this error.

 

To overcome this issue, you need to make sure that all processes can't allocate more memory than there is system memory. In practice this is impossible to do for all processes. At a minimum you should make sure that all your jvm's do not have a total maximum memory allocation than your normally available system memory.

Please refer to this guide for more information.

java.lang.OutOfMemoryError: requested 32756 bytes for ChunkPool::allocate. Out of swap space?

Essentially the native objects does not have enough memory to use. This is usually because you have allocated too much memory to your heap reducing the amount available for native objects. See this article.

The solution is to reduce the amount of heap memory you have allocated. For example if you have set -Xmx4096, you should consider reducing this to -Xmx2048m.

Remember if you are using a 32bit JVM you cannot allocate more than -Xmx2048m for linux (and even less for windows). Using a 64 bit JVM resolves this problem.



Read the Tuning FishEye page for more detail on adjusting resource limits and performance settings in FishEye.

 

13 Comments

  1. Anonymous

    "Please refer to this guide as a reference for JVM tuning."

    Leads to a 404 error.

    1. Thanks for the comment, I have removed the link.

      Cheers,
      Ajay.

  2. Found

    caused

    Fixed by ommitting the quotes:

    (Java 1.6.0_22)

  3. Hi,

    Do we set this in the start.sh script?

    Thanks

     

    1. Wondering the same thing.

       

      I have tried exporting it in linux, adding it to the .profile but it does not pick up the settings I put in.  I can't find where it is getting it's settings from.

      1. I got this to work...  I edited /etc/environment and added the following FISHEYE_OPTS=-Xms512m -Xmx512m -XX:MaxPermSize=2024m

        I'm not saying though that these values will suit you needs, but these suit mine - I checked the system info page within Fisheye/Cricible and these variables are visible.  I also restarted the box, though I'm sure just restarting Fisheye/crucible should be just as suffice.

        I also realized that if fisheye is pointing at the Root of the SVN repo rather than the structure of the repo I was getting JAVA HEAP errors..  When migrating from ondemand to onpremise my repo came down as follows;

        svn/reponame/repostructure (SVN/abc/ABC

        So instead of fisheye looking at http://blah/svn/<repo> it needed to look at http://blah/svn/<repo>/<repo> this stopped my java heap errors even after I edited the JVM variables - In many cases I'm sure this will not affect many people.. But then it happend to me... (smile)

        Hope this helps

        Thanks

        Darren

         

         

  4. Hey, some stuff on this page is a bit misleading...  the max size for linux is not 2G.  That's the max for a 32 bit jvm.  Please include the max for a 64 bit JVM.  Some people here are refusing to give fisheye more than 2G even though I am watching it thrash in a death rattle with GC cause of Allocation Failure.  With over 900 repositories to index, 2G is just not going to cut it.  Please Please Please change the documentation (smile)

    1. Clarified that the 2GB max is for the 32bit JVM. 

      1. excellent.  Thanks! 

    2. What are your memory setting we are  having some problems with our setting.  Thanks in advance for sharing.

  5. I am getting OutOfMemory even with -Xmx1024m:

    INFO: Loading wadlGenerator com.atlassian.plugins.rest.doclet.generators.resourcedoc.AtlassianWadlGeneratorResourceDocSupport
    2014-04-16 21:01:45,018 WARN - [pufferfish] core/src/main/resources/com/pufferfish/core/resources/templates/sonystyle_productIdentifier_lookup.xml@b3f1a95 exceeds indexing size limit (5M, limit is 5M). The contents of this file won't be searchable in FishEye.
    2014-04-16 21:01:45,019 WARN - [pufferfish] cmdline/scripts/pfd/CDWS_DOC_Full_Dump_20111014.xml@1e7aa1f exceeds indexing size limit (10M, limit is 5M). The contents of this file won't be searchable in FishEye.
    Exception in thread "CLEANUP_MANAGER" java.lang.OutOfMemoryError: Java heap space
    at com.persistit.Value.<init>(Value.java:612)
    at com.persistit.Value.<init>(Value.java:587)
    at com.persistit.Exchange.<init>(Exchange.java:314)
    at com.persistit.Exchange.<init>(Exchange.java:408)
    at com.persistit.VolumeStructure.directoryExchange(VolumeStructure.java:133)
    at com.persistit.VolumeStructure.storeTreeStatistics(VolumeStructure.java:259)
    at com.persistit.VolumeStructure.flushStatistics(VolumeStructure.java:378)
    at com.persistit.Persistit.cleanup(Persistit.java:1520)
    at com.persistit.CleanupManager.poll(CleanupManager.java:156)
    at com.persistit.CleanupManager.runTask(CleanupManager.java:87)
    at com.persistit.IOTaskRunnable.run(IOTaskRunnable.java:143)
    at java.lang.Thread.run(Thread.java:701)

    Here's the command I'm running.

    /usr/bin/java -Xmx1024m -XX:MaxNewSize=128m -XX:MaxPermSize=256m -Dfisheye.library.path= -Dfisheye.inst=/var/atlassian/application-data/fecru -Djava.awt.headless=true -Djava.endorsed.dirs=/opt/atlassian/fecru/lib/endorsed -jar /opt/atlassian/fecru/fisheyeboot.jar start

    Any ideas?