OutOfMemoryError due to too Much Memory for Lucene in 32-bit Sun JVMs
Platform Notice: Data Center Only - This article only applies to Atlassian products on the Data Center platform.
Note that this KB was created for the Data Center version of the product. Data Center KBs for non-Data-Center-specific features may also work for Server versions of the product, however they have not been tested. Support for Server* products ended on February 15th 2024. If you are running a Server product, you can visit the Atlassian Server end of support announcement to review your migration options.
*Except Fisheye and Crucible
Symptoms
After giving JIRA a large amount of heap memory, errors like this appear in the logs:
1
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:
1
2
3
4
5
6
# 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.
Was this helpful?