How does the Data tmp folder work?

We are currently having some problem with files being generated in the data tmp folder. In order to look in to this i was wondering how does the data tmp folder work? When does Mendix write files to this folder and when are these cleaned? I also found that on our production machine we have a lot of empty file folders inside the tmp folder, when are these cleaned?
1 answers

Depending on your environment the data/tmp folder is configured as Java temp folder (e.g. in the Mendix cloud this is default the case). This folder is used to write intermediate results of XML processing, Excel exports and thumbnail generation.

In most cases the files are either cleaned up immediately or 'on exit' of the platform, although no guarantees can be given on that. In the end it's an OS responsibility that this folder is cleaned up, as the platform could run for months or years before exiting, which could fill up a lot of disk space. I would suggest to run a cron job or something similar, which cleans up files or folders older than x days.