Skip to content

Frequent DB disk write access even after background jobs disabled #1238

@social-sparrow

Description

@social-sparrow

I have observed frequent disk usage access to sqlite db files on my self hosted instance with background jobs disabled.

Log: MODIFY <docker data>/linkding/data/tasks.sqlite3-wal

I have analyzed the db access scenario by enabling the Debug logs, I observed that, when UI/API access in not used, then also noticed on writes on the disk, which are accessed periodically at ~30S interval.

For my local testing, tweaked the below interval values, this results into nearly ZERO disk write when UI/API was not accessed.

HUEY = {
    "huey_class": "huey.SqliteHuey",
    "consumer": {
        "scheduler_interval": 10,  #--> changed to 200s
        "periodic": True,
        "check_worker_health": True,
        "health_check_interval": 10, #--> changed to 100s
    },
}

I would like to understand the intervals and is it possible to reduce the disk usage when the app inactive ?
Background tasks are absolutely okay but disk writes at periodically in very short intervals could be avoided.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions