slimer 1.0.0 leaves a lot of garbage in /tmp
andynuss opened this issue · 1 comments
I am using slimerjs 1.0.0 release version.
My ec2-instance ran out of disk space because there were a lot of big folders in /tmp with the prefix slimerjs and then some random chars in the suffix of the folder name, and these folders had big files in them.
Is there a way to prevent slimerjs from creating this folder on each execution?
Yes, you can use the -profile command-line option to tell it to put its mess somewhere else.
If the profile directory doesn't exist, it will be created. If it already exists, it will use the existing profile. Two SlimerJS instances must not run with the same profile at the same time, but you can reuse the profile later, which is especially useful for things like image caching, as SlimerJS might not need to download images if they're in the disc cache.
Also, by default SlimerJS will try to clean up a temporary profile on exit, but only if it exits cleanly.
You could also periodically clean up old files from /tmp, which I would recommend anyway.