Skip to content

sqlite locked randomly #1193

Closed
Closed
@Lartza

Description

@Lartza

Migrating from an sqlite file is inconsistently but often failing on "database is locked".

  • pgloader --version

    pgloader version "3.6.2"
    compiled with SBCL 2.0.5
    
  • did you test a fresh compile from the source tree?

    pgloader version "3.6.49e5877"
    compiled with SBCL 2.0.5
    
  • did you search for other similar issues?

  • how can I reproduce the bug?

Running the same exact migration repeatedly fails every so often, sometimes every other run but usually less often. How long you wait between runs does not seem to matter.

The database I am using can be fetched from http://sponsor.ajay.app/database.db (85MB, updates with new data constantly but that should not matter, I am not updating the file between test runs). I did not test if another sqlite database does this.

This is my current load file, but running in a single command line with no load file has the same issue and it's possible it happens more often with that.

load database
     from '/srv/sponsorblock/database.db'
     into pgsql://sponsorblock:<REMOVED>@localhost/sponsorblock

  including only table names like 'usernames','vipusers','sponsortimes'

  with include no drop, truncate, create no tables, create no indexes,
       workers = 4, concurrency = 1

   set work_mem to '32MB', maintenance_work_mem to '512 MB';
  • pgloader output you obtain

Example of repeated runs where it eventually just fails

Debug successful run

Debug failing run

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