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

garbage collection in-process #43

Closed
wants to merge 1 commit into from
Closed

Conversation

sheldon
Copy link
Collaborator

@sheldon sheldon commented Feb 13, 2013

the old style exec php & thing didn't work for backgrounding processes
anyway, so I've moved it in process. still happens after render, so it
shouldn't impact users more than it did before. also using a unix find
which acts 1 file at a time without listing them all first, so high
numbers of files shouldn't crash or use up a lot of memory.

the old style exec php & thing didn't work for backgrounding processes
anyway, so I've moved it in process. still happens after render, so it
shouldn't impact users more than it did before. also using a unix find
which acts 1 file at a time without listing them all first, so high
numbers of files shouldn't crash or use up a lot of memory.
@sheldon
Copy link
Collaborator Author

sheldon commented Feb 13, 2013

hey guys, think this should fix the garbage collection memory issues. won't merge till it's been tested by someone besides me locally just in case.

@sheldon sheldon closed this Jun 13, 2023
@rossriley
Copy link
Collaborator

Sorry, looks like I took too long to review 😂

$stats = stat("$dir/garbage.collect.lock");
if($stats && $stats[9] + WaxSession::$garbage_collection_timeout < time()){
touch("$dir/garbage.collect.lock");
exec("cd $dir && find . -mmin ".(WaxSession::$garbage_collection_timeout / 60)." -exec rm -f \"{}\" \\;"); //mmin is in minutes
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

my plan was to run rm -rf based on an event coming from a render of a request coming in from a remote request. I feel ashamed and very glad it never got merged.

Also, hi Ross! ❤️

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

Successfully merging this pull request may close these issues.

2 participants