PDA

View Full Version : Scan - database cleanup fails



QDon
2009-11-02, 15:19
I am running 7.4.2-29092 on a QNAP TS-509. I get the following error when executing a scan for new or changed music. The database cleanup fails.


0061: [09-11-02 14:53:26.9617] main::main (311) Error: Not updating lastRescanTime!
0060: ]
0059: [09-11-02 14:53:26.9612] main::main (310) Error: Failed when running scan post-process: [Carp::Clan::__ANON__(): Carp::Clan::__ANON__(): DBI Exception: DBD::mysql::st execute failed: Incorrect key file for table '/tmp/#sql_df4_0.MYI'; try to repair it [for Statement "SELECT me.id, me.titlesort, me.contributor, me.compilation, me.year, me.artwork, me.disc, me.discc, me.musicmagic_mixable, me.titlesearch, me.replay_gain, me.replay_peak, me.musicbrainz_id, me.title, tracks.id, tracks.url, tracks.content_type, tracks.title, tracks.titlesort, tracks.titlesearch, tracks.album, tracks.primary_artist, tracks.tracknum, tracks.timestamp, tracks.filesize, tracks.disc, tracks.remote, tracks.audio, tracks.audio_size, tracks.audio_offset, tracks.year, tracks.secs, tracks.cover, tracks.vbr_scale, tracks.bitrate, tracks.samplerate, tracks.samplesize, tracks.channels, tracks.block_alignment, tracks.endian, tracks.bpm, tracks.tagversion, tracks.drm, tracks.musicmagic_mixable, tracks.musicbrainz_id, tracks.lossless, tracks.lyrics, tracks.replay_gain, tracks.replay_peak, tracks.extid FROM albums me LEFT JOIN tracks tracks ON tracks.album = me.id ORDER BY tracks.album"] at /share/MD0_DATA/.qpkg/SSOTS/var/home/SqueezeboxServer/Slim/Schema/Storage.pm line 86
0058:
0057: frame 9: main::main (/share/MD0_DATA/.qpkg/SSOTS/var/home/SqueezeboxServer/scanner.pl line 439)
0056: frame 8: (eval) (/share/MD0_DATA/.qpkg/SSOTS/var/home/SqueezeboxServer/scanner.pl line 306)
0055: frame 7: Slim::Music::Import::runScanPostProcessing (/share/MD0_DATA/.qpkg/SSOTS/var/home/SqueezeboxServer/scanner.pl line 306)
0054: frame 6: Slim::Schema::cleanupStaleTrackEntries (/share/MD0_DATA/.qpkg/SSOTS/var/home/SqueezeboxServer/Slim/Music/Import.pm line 464)
0053: frame 5: Slim::Schema::DBI::removeStaleDBEntries (/share/MD0_DATA/.qpkg/SSOTS/var/home/SqueezeboxServer/Slim/Schema.pm line 1305)
0052: frame 4: DBIx::Class::ResultSet::next (/share/MD0_DATA/.qpkg/SSOTS/var/home/SqueezeboxServer/Slim/Schema/DBI.pm line 76)
0051: frame 3: DBIx::Class::Storage::DBI::Cursor::next (/share/MD0_DATA/.qpkg/SSOTS/var/home/SqueezeboxServer/CPAN/DBIx/Class/ResultSet.pm line 949)
0050: frame 2: DBIx::Class::Storage::DBI::dbh_do (/share/MD0_DATA/.qpkg/SSOTS/var/home/SqueezeboxServer/CPAN/DBIx/Class/Storage/DBI/Cursor.pm line 101)
0049: frame 1: Slim::Schema::Storage::throw_exception (/share/MD0_DATA/.qpkg/SSOTS/var/home/SqueezeboxServer/CPAN/DBIx/Class/Storage/DBI.pm line 562)
0048: frame 0: Slim::Utils::Log::logBacktrace (/share/MD0_DATA/.qpkg/SSOTS/var/home/SqueezeboxServer/Slim/Schema/Storage.pm line 82)
0047:
0046: [09-11-02 14:53:26.9604] Slim::Schema::Storage::throw_exception (82) Backtrace:
0045: [09-11-02 14:53:26.9598] Slim::Schema::Storage::throw_exception (82) Error: Carp::Clan::__ANON__(): DBI Exception: DBD::mysql::st execute failed: Incorrect key file for table '/tmp/#sql_df4_0.MYI'; try to repair it [for Statement "SELECT me.id, me.titlesort, me.contributor, me.compilation, me.year, me.artwork, me.disc, me.discc, me.musicmagic_mixable, me.titlesearch, me.replay_gain, me.replay_peak, me.musicbrainz_id, me.title, tracks.id, tracks.url, tracks.content_type, tracks.title, tracks.titlesort, tracks.titlesearch, tracks.album, tracks.primary_artist, tracks.tracknum, tracks.timestamp, tracks.filesize, tracks.disc, tracks.remote, tracks.audio, tracks.audio_size, tracks.audio_offset, tracks.year, tracks.secs, tracks.cover, tracks.vbr_scale, tracks.bitrate, tracks.samplerate, tracks.samplesize, tracks.channels, tracks.block_alignment, tracks.endian, tracks.bpm, tracks.tagversion, tracks.drm, tracks.musicmagic_mixable, tracks.musicbrainz_id, tracks.lossless, tracks.lyrics, tracks.replay_gain, tracks.replay_peak, tracks.extid FROM albums me LEFT JOIN tracks tracks ON tracks.album = me.id ORDER BY tracks.album"] at /share/MD0_DATA/.qpkg/SSOTS/var/home/SqueezeboxServer/Slim/Schema/Storage.pm line 86
0044:
0043: frame 16: main::main (/share/MD0_DATA/.qpkg/SSOTS/var/home/SqueezeboxServer/scanner.pl line 439)
0042: frame 15: (eval) (/share/MD0_DATA/.qpkg/SSOTS/var/home/SqueezeboxServer/scanner.pl line 306)
0041: frame 14: Slim::Music::Import::runScanPostProcessing (/share/MD0_DATA/.qpkg/SSOTS/var/home/SqueezeboxServer/scanner.pl line 306)
0040: frame 13: Slim::Schema::cleanupStaleTrackEntries (/share/MD0_DATA/.qpkg/SSOTS/var/home/SqueezeboxServer/Slim/Music/Import.pm line 464)
0039: frame 12: Slim::Schema::DBI::removeStaleDBEntries (/share/MD0_DATA/.qpkg/SSOTS/var/home/SqueezeboxServer/Slim/Schema.pm line 1305)
0038: frame 11: DBIx::Class::ResultSet::next (/share/MD0_DATA/.qpkg/SSOTS/var/home/SqueezeboxServer/Slim/Schema/DBI.pm line 76)
0037: frame 10: DBIx::Class::Storage::DBI::Cursor::next (/share/MD0_DATA/.qpkg/SSOTS/var/home/SqueezeboxServer/CPAN/DBIx/Class/ResultSet.pm line 949)
0036: frame 9: DBIx::Class::Storage::DBI::dbh_do (/share/MD0_DATA/.qpkg/SSOTS/var/home/SqueezeboxServer/CPAN/DBIx/Class/Storage/DBI/Cursor.pm line 101)
0035: frame 8: (eval) (/share/MD0_DATA/.qpkg/SSOTS/var/home/SqueezeboxServer/CPAN/DBIx/Class/Storage/DBI.pm line 540)
0034: frame 7: DBIx::Class::Storage::DBI::Cursor::_dbh_next (/share/MD0_DATA/.qpkg/SSOTS/var/home/SqueezeboxServer/CPAN/DBIx/Class/Storage/DBI.pm line 547)
0033: frame 6: DBIx::Class::Storage::DBI::_select (/share/MD0_DATA/.qpkg/SSOTS/var/home/SqueezeboxServer/CPAN/DBIx/Class/Storage/DBI/Cursor.pm line 82)
0032: frame 5: DBIx::Class::Storage::DBI::_execute (/share/MD0_DATA/.qpkg/SSOTS/var/home/SqueezeboxServer/CPAN/DBIx/Class/Storage/DBI.pm line 1451)
0031: frame 4: DBIx::Class::Storage::DBI::dbh_do (/share/MD0_DATA/.qpkg/SSOTS/var/home/SqueezeboxServer/CPAN/DBIx/Class/Storage/DBI.pm line 1227)
0030: frame 3: DBIx::Class::Storage::DBI::_dbh_execute (/share/MD0_DATA/.qpkg/SSOTS/var/home/SqueezeboxServer/CPAN/DBIx/Class/Storage/DBI.pm line 532)
0029: frame 2: DBIx::Class::Storage::DBI::__ANON__ (/share/MD0_DATA/.qpkg/SSOTS/var/home/SqueezeboxServer/CPAN/DBIx/Class/Storage/DBI.pm line 1217)
0028: frame 1: Slim::Schema::Storage::throw_exception (/share/MD0_DATA/.qpkg/SSOTS/var/home/SqueezeboxServer/CPAN/DBIx/Class/Storage/DBI.pm line 957)
0027: frame 0: Slim::Utils::Log::logBacktrace (/share/MD0_DATA/.qpkg/SSOTS/var/home/SqueezeboxServer/Slim/Schema/Storage.pm line 82)
0026:
0025: [09-11-02 14:53:26.9590] Slim::Schema::Storage::throw_exception (82) Backtrace:
0024: [09-11-02 14:53:26.9581] Slim::Schema::Storage::throw_exception (82) Error: DBI Exception: DBD::mysql::st execute failed: Incorrect key file for table '/tmp/#sql_df4_0.MYI'; try to repair it [for Statement "SELECT me.id, me.titlesort, me.contributor, me.compilation, me.year, me.artwork, me.disc, me.discc, me.musicmagic_mixable, me.titlesearch, me.replay_gain, me.replay_peak, me.musicbrainz_id, me.title, tracks.id, tracks.url, tracks.content_type, tracks.title, tracks.titlesort, tracks.titlesearch, tracks.album, tracks.primary_artist, tracks.tracknum, tracks.timestamp, tracks.filesize, tracks.disc, tracks.remote, tracks.audio, tracks.audio_size, tracks.audio_offset, tracks.year, tracks.secs, tracks.cover, tracks.vbr_scale, tracks.bitrate, tracks.samplerate, tracks.samplesize, tracks.channels, tracks.block_alignment, tracks.endian, tracks.bpm, tracks.tagversion, tracks.drm, tracks.musicmagic_mixable, tracks.musicbrainz_id, tracks.lossless, tracks.lyrics, tracks.replay_gain, tracks.replay_peak, tracks.extid FROM albums me LEFT JOIN tracks tracks ON tracks.album = me.id ORDER BY tracks.album"]
0023: [09-11-02 14:52:48.0292] Slim::Music::Import::runScanPostProcessing (462) Starting cleanup of stale track entries
0022: [09-11-02 14:52:48.0281] Slim::Music::Import::endImporter (701) Completed findArtwork Scan in 0 seconds.
0021: [09-11-02 14:52:47.9637] Slim::Music::Import::runScanPostProcessing (438) Starting artwork scan
0020: [09-11-02 14:52:47.9626] Slim::Music::Import::endImporter (701) Completed mergeVariousAlbums Scan in 11 seconds.
0019: [09-11-02 14:52:36.2277] Slim::Music::Import::runScanPostProcessing (430) Starting merge of various artists albums
0018: [09-11-02 14:52:36.1900] Slim::Music::Import::runImporter (567) Starting Slim::Music::PlaylistFolderScan scan
0017: [09-11-02 14:52:36.1890] Slim::Music::Import::endImporter (701) Completed Slim::Music::MusicFolderScan Scan in 64 seconds.

snarlydwarf
2009-11-02, 17:22
[09-11-02 14:53:26.9612] main::main (310) Error: Failed when running scan post-process: [Carp::Clan::__ANON__(): Carp::Clan::__ANON__(): DBI Exception: DBD::mysql::st execute failed: Incorrect key file for table '/tmp/#sql_df4_0.MYI';


Could /tmp have run out of space?

QDon
2009-11-02, 17:46
Does not look like it

Filesystem Size Used Available Use% Mounted on
/dev/ram 124.0M 100.1M 23.8M 81% /
tmpfs 32.0M 108.0k 31.9M 0% /tmp

mherger
2009-11-02, 23:51
> tmpfs 32.0M 108.0k 31.9M 0% /tmp

32MB might easily be consumed during a scan. You should try to configure mysql to use some different folder for temporary storage.

QDon
2009-11-04, 10:02
I moved it via the my.cnf file. Seems to be working now. Thanks!!