Jira Data Center health check reports "Low disk space on device containing temporary directory"
Platform Notice: Data Center - This article applies to Atlassian products on the Data Center platform.
Note that this knowledge base article was created for the Data Center version of the product. Data Center knowledge base articles 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
Summary
The purpose of this KB article is provide a way to resolve the error "Low disk space on device containing temporary directory" reported by the Free Space Health Check.
An example of error is as shown below:
Name: Free space
NodeId: Node 1
Is healthy: false
Failure reason: Low disk space on device containing temporary directory ($JIRA_INSTALL/temp) - 23 GB of free space remaining. Index backup and recovery may fail.
Severity: CRITICALAdditional links: []
If Jira is running on Kubernetes, please refer to the KB article Resolving Issue with Low Disk Space on Jira Temporary Directory Running on Kubernetes instead.
Environment
Jira Data Center on any version below 9.5.0
Cause
Jira creates a temporary directory to store many types of temporary files that should not be deleted while Jira is running as that could cause issues. As explained in the bug JRASERVER-46006: Jira doesn't clean up $JIRA_INSTALL/temp, Jira does not automatically purge this folder on versions lower than 9.5.0. As a result, the size of the temporary folder will increase over time, unless it is manually purged, and the health check error will eventually be thrown as soon as the Jira server starts running low on disk space.
Solution
Resolution 1 - Long term solution
In Jira 9.5.0, we introduced the Jira Temporary Directory Cleaner to solve the issue of instances running out of space. With the help of the feature, during startup, Jira will automatically clean its temporary directory defined by the java.io.tmpdir
property. Please refer to Jira Temporary Directory Cleaner for steps to enable the feature.
If you are running on any Jira version lower than 9.5.0, we recommend upgrading Jira to this version (or any higher version).
Resolution 2 - Short term solution
If you are unable to upgrade Jira, you may remove the files manually by following the below steps:
- Login to the Jira server
- Stop Jira
- Manually delete the files under $JIRA_INSTALL/temp
- Start Jira
It is safe to manually delete the contents of the JIRA INSTALL/temp directory, as long as Jira is not running. Jira uses this directory to store all sorts of temporary files (downloading add-ons, add-ons manually uploaded by users, CSV imports, etc), so deleting it while Jira is running could cause instability, data loss, and system crash.