I do a full automatic wipe and rescan at 5:00 daily. A while ago I
switched from SQLite to MySQL. This gave a slightly better performance.
However, more often than not, te rescan fails with:

Error: Couldn't execute SQL statement: [DELETE FROM playlist_track;] :
[Carp::Clan::__ANON__(): DBI Exception: DBD::mysql::db do failed:
Deadlock found when trying to get lock; try restarting transaction [for
Statement "DELETE FROM playlist_track;"] at
/usr/share/perl5/Slim/Schema/Storage.pm line 125]

And my music collection appears completely empty. I then need to do a
manual rescan, which always succeeds.
The failing statement is one of the first in
/usr/share/squeezeboxserver/SQL/mysql/schema_clear.sql. I tried changing
that to:

DELETE FROM playlist_track where id in (select id from playlist_track);

But that turned up the same error the next day. I can't imagine why
there would be a deadlock on that that table at that time of night.
Certainly no other processes are running that affect this database. I
found only very old mentions of this error. 

Is there anything I can do to ensure the SQL will work? I'm running
MySQL 8.0.31 on Ubuntu Server 20.04.5 LTS. Thanks for any ideas.


------------------------------------------------------------------------
Jos Geluk's Profile: http://forums.slimdevices.com/member.php?userid=21225
View this thread: http://forums.slimdevices.com/showthread.php?t=117325

_______________________________________________
unix mailing list
unix@lists.slimdevices.com
http://lists.slimdevices.com/mailman/listinfo/unix

Reply via email to