Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cleanup temp puppeteer files before or after run #378

Open
dyndragon opened this issue Sep 29, 2020 · 15 comments
Open

Cleanup temp puppeteer files before or after run #378

dyndragon opened this issue Sep 29, 2020 · 15 comments

Comments

@dyndragon
Copy link

dyndragon commented Sep 29, 2020

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?

@dyndragon dyndragon changed the title Disable puppeteer logging Cleanup temp puppeteer files before or after run Sep 29, 2020
@rodalpho
Copy link

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.

@jef
Copy link
Owner

jef commented Sep 30, 2020

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.

@g1forfun
Copy link
Contributor

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.

@jef
Copy link
Owner

jef commented Sep 30, 2020

[Un?]surprisingly, Windows doesn't clean this up.

We can put this on the backlog.

@Dark-talon
Copy link

Same issue, 20GB of puppeteer_dev_chrome_profile folders. Disk cleanup doesn't remove them.

@github-actions
Copy link
Contributor

github-actions bot commented Jan 5, 2021

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

@rahul-raut
Copy link

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?

@luispablo
Copy link

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.

@jef
Copy link
Owner

jef commented Oct 7, 2021

Would be nice if the library itself handled this instead of needed some devops solution for it.

Agreed.

@joska1993
Copy link

+1

@MrKafr
Copy link

MrKafr commented Jul 13, 2022

Is there any solution to this?

@articleten-andy
Copy link

Just found 25GB of profile files in my /tmp folder, would be good if this was built in to tidy these up.

@UsVfxArtia
Copy link

still no solution?

@Jakeroid
Copy link

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 {} \;

@vandspot
Copy link

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 {} \;

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests