• Resolved Jonathan Forby

    (@heyforby)


    Hi! We’ve recently noticed that our server CPU load has been peaking a lot recently. We found that the main cause seems to be constant queries for posts with meta relating to podcast files. We are hosting with Castos, and from the analytics this doesn’t seem to be caused by podcast listens. But there are queries for unique podcast files all the time.

    Is anyone else experiencing this? We haven’t changed any configuration, and all plugins are updated.

    Once the plugin was disabled our CPU load went from an average of 80% to about 20%.

Viewing 11 replies - 1 through 11 (of 11 total)
  • Thread Starter Jonathan Forby

    (@heyforby)

    Here’s a screenshot of our usage, you can tell where we disabled and re-enabled the plugin. ??

    Plugin Contributor Jonathan Bossenger

    (@psykro)

    @heyforby Thanks for bringing this to our attention.

    In order to help isolate the problem here, could I ask you to answer the following questions

    1) Do you have any pages on your site which includes lists of podcast episodes (say more than 25 on a page) either in a regular list, or via a widget
    2) What are the values for the following fields under Settings -> Reading Settings a) Blog pages show at most b) Syndication feeds show the most recent.
    3) Have you submitted your WordPress RSS feed to any distribution services that would ping your RSS feed at regular intervals (eg Spotify)

    Thanks

    Thread Starter Jonathan Forby

    (@heyforby)

    Hi @psykro!

    1) Yeah, we have a podcasts page with two feeds and playlists displayed. Playlist is for latest episode only (limit=1) but the feeds are full ss_podcast shortcodes.

    2) a) 10. b) 100
    But we aren’t posting podcasts as individual posts, only including feeds from the main Podcasts page.

    3) Yeah, Spotify is using one of the SSP generated RSS feeds, not sure about frequency.

    The thing is that the queries we are seeing are searching in posts, but we don’t create posts per episode. eg.:

    SELECT ID FROM posts WHERE post_type = 'attachment' AND guid = 'https://episodes.castos.com/podcast_name/episode.mp3'

    SELECT post_id, meta_value FROM postmeta WHERE meta_key = '_wp_attached_file' AND meta_value = 'https://episodes.castos.com/podcast_name/episode.mp3'

    Plugin Contributor Jonathan Bossenger

    (@psykro)

    Hi @heyforby

    By default, all content types in WordPress are based on the default “post” type, and many plugins simply leverage the custom post type functionality. So for example any media files in the media library are actually stored as posts with the post type ‘attachment’, and any podcasts SSP creates are stored as posts with the post type ‘podcast’

    The RSS feed for your SSP enabled podcast is generated every time the feed url is accessed, so the more episodes you have in your RSS feed (as set by your Syndication feeds show the most recent setting), the higher the CPU usage will be when the RSS feed is accessed.

    There is an open ticket regarding this on the plugin repository – https://github.com/CastosHQ/Seriously-Simple-Podcasting/issues/435.

    The short answer here is to either lower the number of items in your RSS feed, or look into some form of caching for the RSS feed, so that the site doesn’t have to run all the queries that fire every time the RSS feed is being accessed.

    Alternatively, if you are hosting your files via your Castos account, consider using that RSS feed to power your Spotify show. We offer the ability to connect your RSS feed to your Spotify account, and the Castos RSS feeds are cached automatically, meaning less resources on your WordPress site.

    Thread Starter Jonathan Forby

    (@heyforby)

    @psykro that’s great to know about the post type, thanks!

    We are hosting with Castos so using a feed there would be fine, but there doesn’t seem to be a feed on our Castos account. We do have analytics on Castos, but no podcasts/feeds show up. How do we get our SSP podcast to create a feed on Castos? (our account is already linked in WP settings to Castos. I assumed this would already sync to Castos since the file hosting works great, but maybe I’m missing something)

    Thread Starter Jonathan Forby

    (@heyforby)

    I’m also not really seeing a way to lower the items in an RSS feed through SSP. Do you just mean deleting episodes? Or is there a threshold setting somewhere for what to include in the RSS feed?

    Plugin Contributor Jonathan Bossenger

    (@psykro)

    @heyforby please won’t you log a support ticket for the Castos related feed by emailing [email protected]. If it’s a technical issue it will probably come to me anyway ??

    To lower the items in the RSS feed, you need to lower the “Syndication feeds show the most recent” value, as SSP uses that value to determine how many feed items to display.

    Thread Starter Jonathan Forby

    (@heyforby)

    Sure! Thanks.

    Plugin Contributor Jonathan Bossenger

    (@psykro)

    @heyforby after some further investigation, we’ve isolated a possible reason in the plugin why this could be happening.

    Could I check if you’ve sent a ticket to [email protected]? If not, could I ask you to do so, I’d like to include you in a beta test for the possible fix.

    Thread Starter Jonathan Forby

    (@heyforby)

    @psykro I did submit a ticket and they helped me sync everything to Castos to use the RSS feed there instead. We haven’t made the switch quite yet, but reducing the RSS feed count has at least kept us from spiking. If you have a fix for it I’d be more than happy to test it since the plugin is still being served to our Spotify account.

    Plugin Contributor Jonathan Bossenger

    (@psykro)

    Hey @heyforby were you able to submit a ticket specifically take part in the the beta for this fix.

    This could be related to another issue logged in our GitHub repository here – https://github.com/CastosHQ/Seriously-Simple-Podcasting/issues/497 – but until I’m able to find someone who can help me test the fix (I’m not able to replicate the problem on any of our internal hosting plans) I’m not able to confirm that this resolves the problem.

Viewing 11 replies - 1 through 11 (of 11 total)
  • The topic ‘Constant file queries maxing out CPU’ is closed to new replies.