iOS: Appium consumes large amount of disk space in /var/folders location

We use Appium to run our cucumber tests on iPhone devices on our CI (Jenkins).

We’ve noticed, that while running, the Appium (node process in particular) seems to write HUGE amounts of disk space (writing something to /var directory).

It results into the fact , that the Mac eventually (in 1-2 days) runs out of disc space (which was ~100 Gb after the Mac was restarted).

Does anyone encounter the same problem and/or knows the solution for it ?

The Appium server version is 1.6.5 and the appium lib is 9.4.9

P.S. we also tried the clearSystemFiles => true capability and it seems that it doesn’t help

Would be glad to have any feedback,
Thanks in advance

I’ve noticed that problem too. On my system, it seems that many files/directories are created under:
Library/Caches/com.apple.dt.instruments
I have been deleted the older directories (older than 2 months) from com.apple.dt.instruments to free up space and haven’t experienced any problems.

Looks like exactly for your case the ‘clearSystemFiles’ capability has been introduced in 1.6.5. While in our case it is about the /var folder one of the subfolders of which gets overflowed with some trash that sucks the disk space out.

in the mean time you can use any command line commands to delete these data before each run - https://github.com/appium/appium/issues/7933

Unfortunately, our case is about the “/var/folders/{floody_dir}*” directory that gets flooded and has dynamic name, rather than DerivedData, so not so easy to clean automatically each time.

this folder is macOS system. do you close Appium server between executing long test run?

Yes. The server gets started before the execution and is killed after. But the saved trash remains there… And is get cleared only after the Mac is restarted

@Alexander_Szczupak i have same scenario and do not have problem. some mine tests are running every 15 min and without restart. mine appium 1.6.6.

anything new regarding this problem? I am encountering the same one in /var/folders/{dynamic_name}
I run my test using Jenkins as well. I found that Jenkins uses the path as a temporary folder and I can see all the logs there.
additionally there is a file there which never gets deleted name ‘adb.502.log’ it contains all the adb logs in it and it accumulates with each test until reaching a large disk space. along with some stdout files.

because of that every few days I get the following error: ‘no space left on device’ and the build is marked as failure.
does someone had something similar?