[GH-ISSUE #602] Failure to scan "Duplicate entry" #430

Closed
opened 2026-02-26 02:33:11 +03:00 by kerem · 6 comments
Owner

Originally created by @lachlan-00 on GitHub (May 30, 2017).
Original GitHub issue: https://github.com/koel/koel/issues/602

Just downloaded 3.6.2 and installed following the debian guide.
Server is debian stretch
DB is mariadb
Using node --version v6.10.3
Server runs and i can log into the web interface using the internal address
When i add my music and scan the server fails and stops.

Running manually from the command line it's a SQL error

root@web:/opt/koel# sudo -u www-data php artisan koel:sync
Koel syncing started.

  16812/127080 [▓▓▓░░░░░░░░░░░░░░░░░░░░░░░░░]  13%
                                                                               
  [Illuminate\Database\QueryException]                                         
  SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry 'e94b  
  39bc4f686cdc6d773a8772581510' for key 'PRIMARY' (SQL: insert into `songs` (  
  `id`, `title`, `length`, `track`, `lyrics`, `path`, `mtime`, `album_id`, `c  
  ontributing_artist_id`, `updated_at`, `created_at`) values (e94b39bc4f686cd  
  c6d773a8772581510, Encontrarte, 413.98857142857, 11, , /mnt/music/Aura Noct  
  is/(2011) Itineris I [GH 111CD; TW 1.84]/111 - Encontrarte.mp3, 1467848914,  
   1438, 736, 2017-05-30 01:45:44, 2017-05-30 01:45:44))
                                                
  [PDOException]                                                               
  SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry 'e94b  
  39bc4f686cdc6d773a8772581510' for key 'PRIMARY'

This install is brand new so i'm not sure why it would generate an error like this. I do have a large library but it's failing really early in the sync.

Originally created by @lachlan-00 on GitHub (May 30, 2017). Original GitHub issue: https://github.com/koel/koel/issues/602 Just downloaded 3.6.2 and installed following the debian guide. Server is debian stretch DB is mariadb Using node --version v6.10.3 Server runs and i can log into the web interface using the internal address When i add my music and scan the server fails and stops. Running manually from the command line it's a SQL error ~~~ root@web:/opt/koel# sudo -u www-data php artisan koel:sync Koel syncing started. 16812/127080 [▓▓▓░░░░░░░░░░░░░░░░░░░░░░░░░] 13% [Illuminate\Database\QueryException] SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry 'e94b 39bc4f686cdc6d773a8772581510' for key 'PRIMARY' (SQL: insert into `songs` ( `id`, `title`, `length`, `track`, `lyrics`, `path`, `mtime`, `album_id`, `c ontributing_artist_id`, `updated_at`, `created_at`) values (e94b39bc4f686cd c6d773a8772581510, Encontrarte, 413.98857142857, 11, , /mnt/music/Aura Noct is/(2011) Itineris I [GH 111CD; TW 1.84]/111 - Encontrarte.mp3, 1467848914, 1438, 736, 2017-05-30 01:45:44, 2017-05-30 01:45:44)) [PDOException] SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry 'e94b 39bc4f686cdc6d773a8772581510' for key 'PRIMARY' ~~~ This install is brand new so i'm not sure why it would generate an error like this. I do have a large library but it's failing really early in the sync.
kerem closed this issue 2026-02-26 02:33:11 +03:00
Author
Owner

@phanan commented on GitHub (May 30, 2017):

If you rename/remove the song, does the scan go through?

<!-- gh-comment-id:304787924 --> @phanan commented on GitHub (May 30, 2017): If you rename/remove the song, does the scan go through?
Author
Owner

@lachlan-00 commented on GitHub (May 31, 2017):

Moved out and restarted and it's half way. (64,000/127,000)
So it looks like it's an issue with this track specifically.

No issue with the other 10 in the album though.

<!-- gh-comment-id:305045247 --> @lachlan-00 commented on GitHub (May 31, 2017): Moved out and restarted and it's half way. (64,000/127,000) So it looks like it's an issue with this track specifically. No issue with the other 10 in the album though.
Author
Owner

@lachlan-00 commented on GitHub (May 31, 2017):

Initial scan completed but very slowly. (about 1 hour per 10,000 songs.)

When i checked in the morning there are no albums in the web interface. The data appears in the mysql database so it's definitely scanned them.

Restarting the scan again now and it finished in minutes but failed again on a different song.

<!-- gh-comment-id:305345615 --> @lachlan-00 commented on GitHub (May 31, 2017): Initial scan completed but very slowly. (about 1 hour per 10,000 songs.) When i checked in the morning there are no albums in the web interface. The data appears in the mysql database so it's definitely scanned them. Restarting the scan again now and it finished in minutes but failed again on a different song.
Author
Owner

@lachlan-00 commented on GitHub (May 31, 2017):

Is there a limit to the library that i'm hitting?
I have +130,000 songs but it's never reported higher than 127,080 in a sync and nothing show up in the web interface.

I tested by making a single band the library (/mnt/music/Weezer) and it worked.

<!-- gh-comment-id:305347884 --> @lachlan-00 commented on GitHub (May 31, 2017): Is there a limit to the library that i'm hitting? I have +130,000 songs but it's never reported higher than 127,080 in a sync and nothing show up in the web interface. I tested by making a single band the library (/mnt/music/Weezer) and it worked.
Author
Owner

@lachlan-00 commented on GitHub (Jun 1, 2017):

Restarting sync will fix itself it just seems to take a few goes sometimes. The same track doesn't create the error so it could be some kind of bug but is not reproducible.

I've scanned my library multiple times in the last 2 days and the only time it's shown music in the UI is when i use a smaller folder.

Looks like Koel has lots of problems with large libraries but the scan itself is not a problem as all the music is going into the database correctly.

<!-- gh-comment-id:305399500 --> @lachlan-00 commented on GitHub (Jun 1, 2017): Restarting sync will fix itself it just seems to take a few goes sometimes. The same track doesn't create the error so it could be some kind of bug but is not reproducible. I've scanned my library multiple times in the last 2 days and the only time it's shown music in the UI is when i use a smaller folder. Looks like Koel has lots of problems with large libraries but the scan itself is not a problem as all the music is going into the database correctly.
Author
Owner

@phanan commented on GitHub (Jun 1, 2017):

Hmm, I certainly tried with bigger libraries, and Koel would work just
fine. If nothing is shown in the player, it must be another problem
altogether. What do you see in Chrome's console?

On Thu, Jun 1, 2017 at 07:18 lachlan notifications@github.com wrote:

Restarting sync will fix itself it just seems to take a few goes
sometimes. The same track doesn't create the error so it could be some kind
of bug but is not reproducible.

I've scanned my library multiple times in the last 2 days and the only
time it's shown music in the UI is when i use a smaller folder.

Looks like Koel has lots of problems with large libraries but the scan
itself is not a problem as all the music is going into the database
correctly.


You are receiving this because you commented.
Reply to this email directly, view it on GitHub
https://github.com/phanan/koel/issues/602#issuecomment-305399500, or mute
the thread
https://github.com/notifications/unsubscribe-auth/AHrt0iqKZiYj8vF1sWhDBBeP43WqFjwQks5r_lfLgaJpZM4Npvzr
.

<!-- gh-comment-id:305411094 --> @phanan commented on GitHub (Jun 1, 2017): Hmm, I certainly tried with bigger libraries, and Koel would work just fine. If nothing is shown in the player, it must be another problem altogether. What do you see in Chrome's console? On Thu, Jun 1, 2017 at 07:18 lachlan <notifications@github.com> wrote: > Restarting sync will fix itself it just seems to take a few goes > sometimes. The same track doesn't create the error so it could be some kind > of bug but is not reproducible. > > I've scanned my library multiple times in the last 2 days and the only > time it's shown music in the UI is when i use a smaller folder. > > Looks like Koel has lots of problems with large libraries but the scan > itself is not a problem as all the music is going into the database > correctly. > > — > You are receiving this because you commented. > Reply to this email directly, view it on GitHub > <https://github.com/phanan/koel/issues/602#issuecomment-305399500>, or mute > the thread > <https://github.com/notifications/unsubscribe-auth/AHrt0iqKZiYj8vF1sWhDBBeP43WqFjwQks5r_lfLgaJpZM4Npvzr> > . >
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/koel-koel#430
No description provided.