Jira Temporary Directory Cleaner
With Jira release 9.5, we’re introducing a feature to solve the issue of instances running out of space: Jira Temporary Directory Cleaner.
Learn more in the following ticket: - JRASERVER-46006Getting issue details... STATUS
What does this feature do?
Jira will automatically clean its temporary directory during startup.
How to enable the feature?
In Jira 9.5, the feature is disabled by default. We're planning to enable it in the first half of 2023.
To enable the automatic Temporary Directory Cleaner set the tmpdir.clean.on.startup
property to true
. You can do this by adding a new argument in the setenv.sh
script:-Dtmpdir.clean.on.startup=true
.
機能の仕組み
Jira will clean the directory defined by the java.io.tmpdir
property.
安全上の理由のため、Jira は、一時ディレクトリが次のいずれかのサブディレクトリである場合にのみ、対象のディレクトリからのファイルの削除を試みます。
Jira ホーム
Catalina Base (defined by the
catalina.base
property)Catalina Home (defined by the
catalina.home
property)
The feature impacts Jira Service Management if the Jira temporary directory defined by the java.io.tmpdir
property stores temporary files.
New classes that debug logging can be enabled for
All logs in this feature come from com.atlassian.jira.startup.TemporaryDirectoryCleaner
.
Log | 説明 |
---|---|
INFO "The temporary directory cleaner is disabled. It can be enabled by setting the system property 'tmpdir.clean.on.startup' to true" | The Cleaner is turned off. |
INFO "Cleaning the temporary directory located at {}" | The Cleaner is about to start removing temporary files. |
INFO "Finished cleaning the temporary directory." | The Cleaner has finished removing temporary files. |
WARNING "Finished cleaning the temporary directory, but couldn't remove the following files:\n{}" | Some files couldn’t be removed. In this case, the paths of these files will be logged into the log file. But no more than 20 paths will be logged. If there are more, the message about that will appear. |
WARNING ”The temporary directory [{}] does not exist. Skipping cleaning.” | The Cleaner is enabled but the temporary directory doesn’t exist. This won’t cause the Cleaner to fail but won’t remove any files. |
WARNING "The temporary directory [{}] should be located in the Jira Home directory [{}] or in one of directories defined by '{}' or '{}' properties. Skipping cleaning." | The feature is enabled but the temporary directory isn’t located in To fix this, change the location of the temporary directory. To find it, check |
ERROR "Failed to clean the temporary directory located at {}" | There was an exception during the cleaning. The stacktrace will be logged. |