streetmerchant
streetmerchant copied to clipboard
Cleanup temp puppeteer files before or after run
Description
I've discovered over 20GB of temp folders generated in the local user temp directory in windows (C:\Users<username>\AppData\Local\puppeteer*) during the time I've been running nvidia-snatcher. Is there a way to reduce this or keep it cleaner?
Possible solution
Set logging level of chromium browser to error only, or even lower. Cleanup process on startup or shutdown?
They must be cleaned at some point, my puppeteer chrome profile in /tmp only consumes 260MB and I've been running the script for well over a week. On Linux though, not Windows.
They must be cleaned at some point, my puppeteer chrome profile in /tmp only consumes 260MB and I've been running the script for well over a week. On Linux though, not Windows.
I think we get our cache in /tmp/. Here's a good link for how often.
As for Windows users, yeah, it's a good idea. We should figure that out.
On Windows 10 for me, the temp folders for all of the chrome instances live here: C:\Users\XXXX\AppData\Local\Temp
Many folders named puppeteer_dev_chrome_profile-guid
Mine is sitting at 5Gb at the moment, shutdown PC last night and powered on this morning.
Same issue, 20GB of puppeteer_dev_chrome_profile folders. Disk cleanup doesn't remove them.
This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days
We are trying to run end to end tests on lambda containers using webdriverIO. Temp files generated by puppeteer is creating problem as lambda user don't have access to write files in the container. Is there any configuration so that puppeteer will stop generating temp files?
In out case the puppetter profile directories and files in the /tmp directory left a big VM unbootable. Would be nice if the library itself handled this instead of needed some devops solution for it.
Would be nice if the library itself handled this instead of needed some devops solution for it.
Agreed.
+1
Is there any solution to this?
Just found 25GB of profile files in my /tmp folder, would be good if this was built in to tidy these up.
still no solution?
I solve that on my server by creating cron task to remove all files older than 15 days. I used rm -rf to remove files and directories.
find /tmp/puppeteer* -mtime +15 -exec rm -rf {} \;
Also: find /tmp/.org.chromium.Chromium* -exec rm -rf {} ;
I solve that on my server by creating cron task to remove all files older than 15 days. I used rm -rf to remove files and directories.
find /tmp/puppeteer* -mtime +15 -exec rm -rf {} \;