[GH-ISSUE #2160] [Bug]: Podcast sync does not properly work #1100

Open
opened 2026-02-26 02:35:14 +03:00 by kerem · 15 comments
Owner

Originally created by @vmario89 on GitHub (Oct 27, 2025).
Original GitHub issue: https://github.com/koel/koel/issues/2160

Originally assigned to: @phanan on GitHub.

Read the Troubleshooting guide.

  • I have read and followed the Troubleshooting guide

Reproduction steps

Add https://cdn.julephosting.de/podcasts/1355-lanz-precht/feed.rss as Podcast URL in frontend. There are 218 episodes right now. Feed file seems to be valid: https://validator.truefans.fm/?validate=https://cdn.julephosting.de/podcasts/1355-lanz-precht/feed.rss

my Koel instance only shows 190 and stopped in april 2025. i dont know why.

Neither the UI sync button brings error, nor 'php8.3 artisan koel:podcasts:sync' on cli

Expected behavior

sync the full podcast rss feed

Actual behavior

Only partial data is synced

Logs

the log file does not complain about any issue

Koel version

8.1.0

How did you install Koel?

Compiled from source

Additional information

  • Server OS: ubuntu 24 lts
  • PHP version: 8.3
  • Database: pgsql
  • Node version:
  • Browser & device: firefox
  • Additional context:
Originally created by @vmario89 on GitHub (Oct 27, 2025). Original GitHub issue: https://github.com/koel/koel/issues/2160 Originally assigned to: @phanan on GitHub. ### Read the Troubleshooting guide. - [x] I have read and followed the Troubleshooting guide ### Reproduction steps Add https://cdn.julephosting.de/podcasts/1355-lanz-precht/feed.rss as Podcast URL in frontend. There are 218 episodes right now. Feed file seems to be valid: https://validator.truefans.fm/?validate=https://cdn.julephosting.de/podcasts/1355-lanz-precht/feed.rss my Koel instance only shows 190 and stopped in april 2025. i dont know why. Neither the UI sync button brings error, nor 'php8.3 artisan koel:podcasts:sync' on cli ### Expected behavior sync the full podcast rss feed ### Actual behavior Only partial data is synced ### Logs the log file does not complain about any issue ### Koel version 8.1.0 ### How did you install Koel? Compiled from source ### Additional information - **Server OS**: ubuntu 24 lts - **PHP version**: 8.3 - **Database**: pgsql - **Node version**: - **Browser & device**: firefox - **Additional context**:
Author
Owner

@vmario89 commented on GitHub (Oct 27, 2025):

ps: this already appeared in older versions of Koel, too

<!-- gh-comment-id:3453236140 --> @vmario89 commented on GitHub (Oct 27, 2025): ps: this already appeared in older versions of Koel, too
Author
Owner

@phanan commented on GitHub (Oct 28, 2025):

@vmario89 This is how it looks with my setup:

Image

As you can see, Koel managed to fetch the whole podcast. Maybe there's a memory issue?

<!-- gh-comment-id:3455603852 --> @phanan commented on GitHub (Oct 28, 2025): @vmario89 This is how it looks with my setup: <img width="1131" height="712" alt="Image" src="https://github.com/user-attachments/assets/d9b15f1d-5053-42aa-a1af-5dd9b4307c20" /> As you can see, Koel managed to fetch the whole podcast. Maybe there's a memory issue?
Author
Owner

@phanan commented on GitHub (Oct 28, 2025):

OK I've managed to reproduce the bug. Will look into it.

<!-- gh-comment-id:3456656941 --> @phanan commented on GitHub (Oct 28, 2025): OK I've managed to reproduce the bug. Will look into it.
Author
Owner

@phanan commented on GitHub (Oct 28, 2025):

Actually no. I tried deleting some of the latest episodes, setting the podcast's last_synced_at property to somewhere in the past, and refreshing the podcast – all episodes come back as expected.

<!-- gh-comment-id:3456720867 --> @phanan commented on GitHub (Oct 28, 2025): Actually no. I tried deleting some of the latest episodes, setting the podcast's `last_synced_at` property to somewhere in the past, and refreshing the podcast – all episodes come back as expected.
Author
Owner

@vmario89 commented on GitHub (Oct 28, 2025):

but interestingly when i unsubscribe the podcast from web ui, the entry is not dropped in database

Image Image note: in that screenshot i messed around with manual url overwriting to see what happens
<!-- gh-comment-id:3456810768 --> @vmario89 commented on GitHub (Oct 28, 2025): but interestingly when i unsubscribe the podcast from web ui, the entry is not dropped in database <img width="1356" height="759" alt="Image" src="https://github.com/user-attachments/assets/256bbb45-ccab-4105-8466-934bc5cf85bf" /> <img width="1854" height="587" alt="Image" src="https://github.com/user-attachments/assets/8061e721-3c09-4dce-a523-b688cc2112c8" /> note: in that screenshot i messed around with manual url overwriting to see what happens
Author
Owner

@vmario89 commented on GitHub (Oct 28, 2025):

i already unsubscribed and readded the podcast, but there is still an old updated_at timestamp existing and the last_synced_at did not update

<!-- gh-comment-id:3456813124 --> @vmario89 commented on GitHub (Oct 28, 2025): i already unsubscribed and readded the podcast, but there is still an old updated_at timestamp existing and the last_synced_at did not update
Author
Owner

@vmario89 commented on GitHub (Oct 28, 2025):

i wonder how it is possible that the database contains the entry, but the gui does not show it aufter unsubscription

edit: ah okay this is caused by dropping an entry in podcast_user table

<!-- gh-comment-id:3456821907 --> @vmario89 commented on GitHub (Oct 28, 2025): i wonder how it is possible that the database contains the entry, but the gui does not show it aufter unsubscription edit: ah okay this is caused by dropping an entry in `podcast_user` table
Author
Owner

@vmario89 commented on GitHub (Oct 28, 2025):

when i run truncate podcasts; and then php8.3 artisan koel:podcasts:sync the sync runs without errors, but no title is showing up at all

<!-- gh-comment-id:3456848983 --> @vmario89 commented on GitHub (Oct 28, 2025): when i run `truncate podcasts;` and then `php8.3 artisan koel:podcasts:sync` the sync runs without errors, but no title is showing up at all
Author
Owner

@phanan commented on GitHub (Oct 28, 2025):

Truncating podcasts means there's no podcast in your system at all, so it makes sense that nothing shows up.

<!-- gh-comment-id:3456860991 --> @phanan commented on GitHub (Oct 28, 2025): Truncating `podcasts` means there's no podcast in your system at all, so it makes sense that nothing shows up.
Author
Owner

@vmario89 commented on GitHub (Oct 28, 2025):

ah sorry sorry i did not mean truncate podcasts (this does not work, because foreign key restriction disallows). i did delete from songs where podcast_id is not null; i thought after clearing a new sync might catch up them all again maybe.

<!-- gh-comment-id:3456864872 --> @vmario89 commented on GitHub (Oct 28, 2025): ah sorry sorry i did not mean `truncate podcasts` (this does not work, because foreign key restriction disallows). i did `delete from songs where podcast_id is not null;` i thought after clearing a new sync might catch up them all again maybe.
Author
Owner

@vmario89 commented on GitHub (Oct 28, 2025):

the general doctor log looks okay so far

                                                                                                                                                                        
                                                                         CHECKING KOEL SETUP...                                                                         
                                                                                                                                                                        

  Artifacts directory /tmp/koel/ is readable/writable ........................................................................................... OK  
  Session directory storage/framework/sessions is readable/writable ............................................................................. OK  
  Cache directory storage/framework/cache is readable/writable .................................................................................. OK  
  Log directory storage/logs is readable/writable ............................................................................................... OK  
  Checking database connection .................................................................................................................. OK  
  Media storage setup (local) ................................................................................................................... OK  
  TNT search index directory storage/search-indexes is readable/writable ........................................................................ OK  
  API is healthy ................................................................................................................................ OK  
  FFmpeg binary /usr/bin/ffmpeg is executable ................................................................................................... OK  
  PHP extension zip is loaded. Multi-file downloading is supported .............................................................................. OK  
  Max upload size ............................................................................................................................... 2M  
  Max post size ................................................................................................................................. 8M  
  Streaming method ............................................................................................................................. php  
  Last.fm integration ........................................................................................................................... OK  
  YouTube integration ........................................................................................................................... OK  
  Spotify integration ........................................................................................................................... OK  
  Mailer configuration .......................................................................................................................... OK  
  Koel scheduler status .............................................................................................................. Not installed  
  Koel Plus license status ........................................................................................................... Not available  

                                                                                                                        
 [OK] Your Koel setup should be good to go! 
<!-- gh-comment-id:3456895885 --> @vmario89 commented on GitHub (Oct 28, 2025): the general doctor log looks okay so far ``` CHECKING KOEL SETUP... Artifacts directory /tmp/koel/ is readable/writable ........................................................................................... OK Session directory storage/framework/sessions is readable/writable ............................................................................. OK Cache directory storage/framework/cache is readable/writable .................................................................................. OK Log directory storage/logs is readable/writable ............................................................................................... OK Checking database connection .................................................................................................................. OK Media storage setup (local) ................................................................................................................... OK TNT search index directory storage/search-indexes is readable/writable ........................................................................ OK API is healthy ................................................................................................................................ OK FFmpeg binary /usr/bin/ffmpeg is executable ................................................................................................... OK PHP extension zip is loaded. Multi-file downloading is supported .............................................................................. OK Max upload size ............................................................................................................................... 2M Max post size ................................................................................................................................. 8M Streaming method ............................................................................................................................. php Last.fm integration ........................................................................................................................... OK YouTube integration ........................................................................................................................... OK Spotify integration ........................................................................................................................... OK Mailer configuration .......................................................................................................................... OK Koel scheduler status .............................................................................................................. Not installed Koel Plus license status ........................................................................................................... Not available [OK] Your Koel setup should be good to go! ```
Author
Owner

@phanan commented on GitHub (Oct 28, 2025):

Koel keeps track of the last time a podcast is synced (last_synced_at). When fetching a podcast, Koel compares its pubDate or lastBuildDate with the last_synced_at value to determine if syncing should take place. As such, if you want to force a sync, modify this value accordingly.

<!-- gh-comment-id:3456919439 --> @phanan commented on GitHub (Oct 28, 2025): Koel keeps track of the last time a podcast is synced (`last_synced_at`). When fetching a podcast, Koel compares its `pubDate` or `lastBuildDate` with the `last_synced_at` value to determine if syncing should take place. As such, if you want to force a sync, modify this value accordingly.
Author
Owner

@vmario89 commented on GitHub (Oct 28, 2025):

koel=# update podcasts set last_synced_at = '2023-04-26 22:00:00';
UPDATE 1
koel=# update podcasts set updated_at = '2023-04-26 22:00:00';
UPDATE 1

this does not change it. no reaction on sync, no synced data, no updated last_synced_at timestamp in database after this ation. and no single log entry about success or failure in storage/logs/ :-O

i updated php8.3 to 8.4 in the meantime; no change in behaviour

<!-- gh-comment-id:3456945895 --> @vmario89 commented on GitHub (Oct 28, 2025): ``` koel=# update podcasts set last_synced_at = '2023-04-26 22:00:00'; UPDATE 1 koel=# update podcasts set updated_at = '2023-04-26 22:00:00'; UPDATE 1 ``` this does not change it. no reaction on sync, no synced data, no updated last_synced_at timestamp in database after this ation. and no single log entry about success or failure in storage/logs/ :-O i updated php8.3 to 8.4 in the meantime; no change in behaviour
Author
Owner

@vmario89 commented on GitHub (Oct 28, 2025):

could there be any problem regards language or collations maybe?

<!-- gh-comment-id:3456949648 --> @vmario89 commented on GitHub (Oct 28, 2025): could there be any problem regards language or collations maybe?
Author
Owner

@phanan commented on GitHub (Oct 28, 2025):

I don't think so.

<!-- gh-comment-id:3456988540 --> @phanan commented on GitHub (Oct 28, 2025): I don't think so.
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#1100
No description provided.