Skip to content

previews:cleanup issues #40383

@mmattel

Description

@mmattel

Important, files and database are on a fast NFS (NetApp) backend connected via GbE. Enterprise server running VMWare as host for ownCloud.

Steps to reproduce

  1. upgrade from 10.10 to 10.11
  2. run occ previews:cleanup without any options/arguments

Post successful upgrading, started occ previews:cleanup without any options/arguments. This means it should make one round with max 1000 entries (chunks) which is the default. The command started at 18h and did not finish until 23h. Rechecking in the moring, ist finished and reported 1103 orphaned previews deleted. Means it took between 4 and 11h... (remember, it is only a small instance started many years ago). Running htop in a second shell, memory is fine, mariadb takes 1-2 cores with 100%.

Following findings:

  • the command took extremely long, my instance is a small one
  • there is no update what is going on, though you see a lot of NFS traffic
  • the default chunksize of 1000 does not get respected, it cleaned up 1103
  • compared when you do a fresh install of oc 10.11, when upgrading, you do not get the entry in the backgroundjobs table OCA\Files\BackgroundJob\PreviewCleanupJob
  • the command cant be stopped (ctrl c) once started

Required Solutions:

  • update the documentation to relax this situation
  • fix the code, especially for:
    -- improve performance
    -- respect the chunksize
    -- add the bg job to the table automatically when upgrading (migration step necessary?)
    -- improve command responsiveness (maybe to add a progress option, a timestamp how long it took)

@DeepDiver1975 @pmaier1 fyi
@jnweiger

Referencing feat: previews are physically deleted from disk and db in an async manner

Server configuration

Operating system: U22.04

Web server: nginx

Database: mariadb

PHP version: 7.4

ownCloud version: 10.11

Updated from an older ownCloud or fresh install: yes

Where did you install ownCloud from: tar

Signing status (ownCloud 9.0 and above): all good

ownCloud log (data/owncloud.log)

nothing relevant

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions