We've been getting some large (multiple thousands) RSS imports lately.
After #1066 and #1067, we seem to get through the initial "import" without clogging the workers.
But now, the thousands of Porter callbacks seem to be clogging the publish queue. Yesterday, I ended up setting locked = true on a Podcast and terminating hundreds of SELECT pg_advisory_lock(1, 9999) statements in postgres before the workers unblocked (they were processing < 1 job a minute... and maybe just timing out?)
This works around any contention in that publishing queue advisory lock, by delaying unlocking the podcast for 1 minute per 150 episodes. The ReleaseEpisodesJob cron will pick the Podcast up and call .publish! once we get past the podcast.locked_until timestamp.
We've been getting some large (multiple thousands) RSS imports lately.
After #1066 and #1067, we seem to get through the initial "import" without clogging the workers.
But now, the thousands of Porter callbacks seem to be clogging the publish queue. Yesterday, I ended up setting
locked = true
on a Podcast and terminating hundreds ofSELECT pg_advisory_lock(1, 9999)
statements in postgres before the workers unblocked (they were processing < 1 job a minute... and maybe just timing out?)This works around any contention in that publishing queue advisory lock, by delaying unlocking the podcast for 1 minute per 150 episodes. The
ReleaseEpisodesJob
cron will pick the Podcast up and call.publish!
once we get past thepodcast.locked_until
timestamp.