cleansing folder Confluence_Application_Data\sandbox
Asked by Jean-Michel Rottiers:

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


Answers:
author: Jean-Michel Rottiers
body: ### Answer from Atlassian support {#toc-hId-2113333932}

### Diagnosis {#toc-hId-305879469}

One of the important features of Confluence Datacenter is an [external process pool](https://urldefense.com/v3/__https:/confluence.atlassian.com/doc/external-process-pool-for-confluence-data-center-958779098.html__;!!O_dAFx4nnjTyVuomCO8!8h7zWZxQGp05JiUWkWEsfych_7p27V6hkdzsxeUfVsm11E5m77Xx4rV-tpWyD-aoZbhCCjdV1KVFoYSNuZIwTo91na0eFAihH_Gv8PTV$) 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.


author: Nic Brough -Adaptavist-
body: 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.

comments: author: Jean-Michel Rottiers
body: 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](https://community.atlassian.com/t5/image/serverpage/image-id/307428i7245B7DB0A5C32B9/image-size/large?v=v2&px=999 "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


author: Nic Brough -Adaptavist-
body: 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.


author: Jean-Michel Rottiers
body: 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


author: Jean-Michel Rottiers
body: I think the files are related to document conversion process (temp files?) so is it safe to delete?  


Tags: confluence-data-center

confluence-server

data-center

server