[Bug]: Podcast sync does not properly work
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:
ps: this already appeared in older versions of Koel, too
@vmario89 This is how it looks with my setup:
As you can see, Koel managed to fetch the whole podcast. Maybe there's a memory issue?
OK I've managed to reproduce the bug. Will look into it.
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.
but interestingly when i unsubscribe the podcast from web ui, the entry is not dropped in database
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
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
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
Truncating podcasts means there's no podcast in your system at all, so it makes sense that nothing shows up.
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.
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!
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.
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
could there be any problem regards language or collations maybe?
I don't think so.