cleansing folder Confluence_Application_Data\sandbox

Jean-Michel Rottiers February 20, 2024

Good morning

 

Question about one confluence folder (Data Center version 8.5.4)
Confluence_Application_Data\sandbox

I did'nt found explanation about the role of this folder and as we have a very large number of files in this folder of our instance (200000+ and growing) I would like to know if it's safe to delete files from this location? Should we stop the instance before cleansing the folder?

Thank you for your reply.

Regards

3 answers

1 accepted

0 votes
Answer accepted
Jean-Michel Rottiers February 21, 2024

Answer from Atlassian support

Diagnosis

One of the important features of Confluence Datacenter is an external process pool that will handle all document conversion and export to PDF processes. In the past, these processes were managed on the Confluence JVM heap itself and could crash the whole system during a failed conversion/export. That's not the case anymore as Confluence Datacenter now manages those processes separately from the main JVM heap using what is called sandboxes.

By design there will be 2 sandboxes, being 1Gb each (Total of 2Gb) that will be used when needed.

When those processes are running they will create temporary files under the <confluence-home>/sandbox folder, which won't be automatically cleaned, so answering your question, it is safe to delete any files under this folder from time to time. Just make sure there are no users connected to the environment doing any conversion/export or you may be cleaning up files that are still being used and so far necessary until the conversion/export finishes.

0 votes
Nic Brough -Adaptavist-
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
February 20, 2024

Hi John-Michel,

Possibly...

Confluence_application_data/sandbox is not a default name for a directory in Confluence, so I would want to check exactly what it is before I suggest if it is ok to delete files from it.

Confluence runs on two directories - an install directory and a home directory.  The install directory does not have data written to it much, it's mostly the Tomcat logs that get written, and you don't strictly need any of it in a backup - you can install a new Confluence and restore the home directory and database if you want to recover a damaged install.

The home directory contains a number of working directories though.  It contains the index, the downloaded plugins, the attachments and several other working directories.

Including, as you have said, a working directory filled with temporary files that come from making file conversions and thumbnails.

So, if Confluence_application_data/sandbox is the home directory for your install, no, do not delete anything in there.  But do go down a level - there should be directories in the home with names that clearly shows they are working or temporary directories.   In these, yes, you can delete the temporary files.  Do not delete from attachments, plugins or the cache directory!

I do recommend that you stop Confluence before deleting anything, but only if you're planning to delete everything.  If you don't want to stop it, then it's best to leave some of the files there - deleting anything that has not been written to for over a week is not going to cause you problems, the worst case is that a few pages might render more slowly.

Jean-Michel Rottiers February 20, 2024

Thank you for your reply

Application with binaries is in C:\Program Files
Home Directory containing the application data is under a G:\Drive
Capture.JPG

I suspect that most of the files are linked to scripted exports of pages. Script runs daily overs thousands of pages. 
Perhaps should check with the plugin (ACLI) supplier

Regards

Nic Brough -Adaptavist-
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
February 20, 2024

That directory listing is definitely an Atlassian system's home directory.

"Sandbox" is not what I would expect to see in a there, so I agree with you that there is something external creating and using it.

FWIW, most apps that create files in the home directory will usually do it in one of the plugin directories, or a directory like "sandbox", but usually named after the plugin, either it's app name, or at least the app key (something like com.onresolve.scriptrunner.data)

If you're looking for disk space, as well as sandbox, have a quick look in the log directories, export, imgEffects and restore.  The logs may be being rotated (they get to a certain size, then a new one is created, and older ones deleted, so they won't just quietly take all your disk space), but the export, restore and imgEffects all contain temporary files that you probably don't need.  It's safe to delete anything you don't need in there if it's over a couple of days old.

Jean-Michel Rottiers February 21, 2024

Well did some further test on a test instance and when performing a pdf export page using the native confluence feature (dialog on top right part of the page) I see temporary files &folders being produced & stored in this folder during the pdf generation process.

Temp files/folders are not deleted after the PDF generation or download.  

So I will raise the case to the confluence support team to see if further instructions on how to safely clean (automatically) those temp files.

Regards

Shaneel Bechoo October 2, 2024

Hi

Have you logged this through to support and did you receive feedback?

Interested as I have a similar issue and would like to know the solution.

Kind Regards

Jean-Michel Rottiers
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
October 2, 2024

the support operator agrred with my remark and created ticket in jira.atlassain.com
CONFSERVER-94705 - Confluence Clean Temporary Directory job should also clean <confluence-home>/sandbox

https://jira.atlassian.com/browse/CONFSERVER-94705 

Regards

Jean-Michel Rottiers
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
October 2, 2024

so Shaneel meanwhile I run daily a script which delete files no longer needed.

0 votes
Jean-Michel Rottiers February 20, 2024

I think the files are related to document conversion process (temp files?) so is it safe to delete?

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
SERVER
TAGS
AUG Leaders

Atlassian Community Events