Skip to content

Sqlite: recognize:classify fails due to deadlocks #789

Closed

Description

@luxzg

Which version of recognize are you using?

3.7.0

Enabled Modes

Face recognition

TensorFlow mode

Normal mode

Which Nextcloud version do you have installed?

26.0.0

Which Operating system do you have installed?

Ubuntu 22.04

Which Docker container are you using to run Nextcloud? (if applicable)

none

How much RAM does your server have?

16GB

What processor Architecture does your CPU have?

x86

Describe the Bug

Run classification command:
sudo -u www-data php /var/www/nextcloud/occ recognize:classify

After a few hours (sometimes half an hour, sometimes 4 hours) it dies with an error in terminal (or SSH):

In DbalException.php line 70:

  An exception occurred while executing a query: SQLSTATE[40001]: Serialization failure: 1213 Deadlock found when trying to get lock; try restarting transaction

In ExceptionConverter.php line 41:

  An exception occurred while executing a query: SQLSTATE[40001]: Serialization failure: 1213 Deadlock found when trying to get lock; try restarting transaction

In Exception.php line 30:

  SQLSTATE[40001]: Serialization failure: 1213 Deadlock found when trying to get lock; try restarting transaction

In Statement.php line 101:

  SQLSTATE[40001]: Serialization failure: 1213 Deadlock found when trying to get lock; try restarting transaction

recognize:classify

Screenshot:
image

Expected Behavior

Log error, move on, get back to the work later... Or if you simply have to fail, then remember where you've stopped so I don't have to restart from "Gorilla.jpg"

To Reproduce

Not sure, but:

  • new installation
  • 4TB of photo/video added
  • enabled or manually running preview-generate, memories:index, recognize:classify and other similar indexing operations
  • probably fails due to many apps and jobs trying to index all that data at once (even though I've tried really hard not to do anything in parallel)

I had exact same error happening at least twice in my SSH logs (Putty), but also had few more failures that I did not log, because they were ran on physical server's console

Debug log

None, and for now I'm done classifying, but let me know if you want me to do something next time, and point me to what exactly you need.

Activity

  1. added
    bug
    on Apr 4, 2023
  2. marcelklehr commented on Apr 26, 2023

    @marcelklehr
    Member

    Thank your for reporting this. It's sadly kind of hard to pin point where in the recognize this error occurs :/

  3. marcelklehr commented on Aug 15, 2023

    @marcelklehr
    Member

    I've only ever ran into this error when running on sqlite, are you on sqlite as well?

  4. changed the title [-]recognize:classify fails due to deadlocks[/-] [+]Sqlite: recognize:classify fails due to deadlocks[/+] on Aug 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bug

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions