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

files_versions taking up a lot of space #18151

Closed
bhcopeland opened this issue Aug 9, 2015 · 13 comments
Closed

files_versions taking up a lot of space #18151

bhcopeland opened this issue Aug 9, 2015 · 13 comments

Comments

@bhcopeland
Copy link

I am running linux and have a real issue with file_versions filling up space.

My disk quota is set to 100G, but I still get stupid sized folders with file versions

693G /home/owncloud/data/bhcopeland/files_versions/config/hexchat/logs/

ls | wc -l 61782

@MorrisJobke
Copy link
Contributor

cc @schiesbn

@enoch85
Copy link
Member

enoch85 commented Aug 9, 2015

Shouldn't cron.php take care of that?

@PVince81
Copy link
Contributor

In OC < 8.0 the expiration of versions for a file X should happen on the fly as soon as file X is overwritten. Not sure why it wouldn't do so here.
In OC >= 8.1 instead of expiring directly, a job is scheduled from the cron queue to do the expiration for file X. So the next cron run should do the cleanup for that specific file.

@PVince81
Copy link
Contributor

also the expiration algorithm is supposed to take the quota into account when deciding which versions to expire.

@xn--nding-jua
Copy link

Hey,

the problem may be regarded to this problem: #8531

calling cron.php will only execute one single job. On my ownCloud-instance more than 3000 jobs (most of them regarded to file_version) have been collected. My cron.php is called every 15 Minutes, but this was not enought for this huge amount of jobs (3000*0,25h=750h). But new jobs will be added to the jobs-list. So in my view here is a design-problem. A workaround may be:

in cron.php replace

$jobList = \OC::$server->getJobList();
$job = $jobList->getNext();
if ($job != null) {
    $job->execute($jobList, $logger);
    $jobList->setLastJob($job);
}

with

$jobList = \OC::$server->getJobList();
$jobs = $jobList->getAll();
foreach ($jobs as $job) {
    if ($job != null) {
        $job->execute($jobList, $logger);
    }
}

kind regards,
Chris

@PVince81
Copy link
Contributor

@xn--nding-jua are you on 8.1 ?
Too many oc_jobs => see "Debounce expiration jobs" #16826

@xn--nding-jua
Copy link

Yepp, using 8.1.0 at the moment.

@ljsjl
Copy link

ljsjl commented Sep 8, 2015

My $0.02. We're looking at deploying owncloud in a research college, and in testing I ran into this oc_jobs issue with cron.php and files_version/files_trashbin (via some aggressive test scripts). I can't see us running with those apps enabled as cron.php would never catch up, and the oc_jobs table would get out of hand.

On our system cron.php seems to manage about 2-3 trashbin tasks a minute which seems really slow. I killed my test script this morning and there's about three day's worth of cron tasks queued up. A better queuing system as discussed in the issue linked above, which allows more than one worker would go some ways to helping.

@PVince81
Copy link
Contributor

PVince81 commented Mar 2, 2016

@MorrisJobke I think this should be fixed/improved already, was it in 8.2.2 or 9.0 ?

@MorrisJobke
Copy link
Contributor

@MorrisJobke I think this should be fixed/improved already, was it in 8.2.2 or 9.0 ?

8.2.3 and 8.1.6 (so the upcoming releases)

@MorrisJobke
Copy link
Contributor

8.2.3 and 8.1.6 (so the upcoming releases)

This is only the deduplication. For parallel cron.php runs we have #22000

@MorrisJobke
Copy link
Contributor

In the end the files_versions should be fixed now. We will improve this further in the future with faster/parallel execution, but it should work.

If there are still too many files in the versions, feel free to reopen this case. Thanks

@lock
Copy link

lock bot commented Aug 5, 2019

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock bot locked as resolved and limited conversation to collaborators Aug 5, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

6 participants