OutOfMemoryError due to too Much Memory for Lucene in 32-bit Sun JVMs

Still need help?

The Atlassian Community is here for you.

Ask the community

Symptoms

After giving JIRA a large amount of heap memory, errors like this appear in the logs:

HTTP Status 404 - Could not execute action [ViewIssue]:OutOfMemoryError likely caused by the Sun VM Bug described in https://issues.apache.org/jira/browse/LUCENE-1566; try calling FSDirectory.setReadChunkSize with a a value smaller than the current chunk size (104857600)<p><small><small><pre>java.lang.OutOfMemoryError: OutOfMemoryError likely caused by the Sun VM Bug described in https://issues.apache.org/jira/browse/LUCENE-1566; try calling FSDirectory.setReadChunkSize with a a value smaller than the current chunk size (104857600) at

In some cases the JVM will terminate with a HotSpot error. The Error message usually refers to being "out of swap space" even if the system has sufficient swap:

# A fatal error has been detected by the Java Runtime Environment:
#
# java.lang.OutOfMemoryError: requested 4096000 bytes for GrET in /BUILD_AREA/jdk6_14/hotspot/src/share/vm/utilities/growableArray.cpp. Out of swap space?
#
#  Internal Error (allocation.inline.hpp:39), pid=20830, tid=179870608
#  Error: GrET in /BUILD_AREA/jdk6_14/hotspot/src/share/vm/utilities/growableArray.cpp

Cause

This is caused by a bug in 32-bit Sun JVMs. You can read about Sun's bug in their issue tracker.

Workaround

There is a workaround implemented by Lucene which has been incorporated into JIRA 4.1. This works for most memory sizes, but large heap sizes will still encounter this problem.

Upgrade to JIRA 4.1+ to implement the Lucene workaround.

Resolution

If the workaround has not helped or you cannot upgrade, give JIRA less heap by changing your JVM parameters or switch to a 64-bit JVM.

Last modified on Mar 30, 2016

Was this helpful?

Yes
No
Provide feedback about this article
Powered by Confluence and Scroll Viewport.