• Resolved JICCarrier

    (@jiccarrier)


    Hi, Need help with the plugin, specifically RSS.

    I have 1550 job posts on my site. A lot of external sites scrape our RSS so they can post our jobs on their sites also.

    When I try to receive all jobs in RSS (https://wdevl.cretecarrier.com/?feed=job_feed), the site crashes due to lack of memory (trying to allocate over 1 Gig).

    I’m currently using https://wdevl.cretecarrier.com/?feed=job_feed&posts_per_page=100 which will show 100 posts, which does not crash the site.

    Surely I’m not the only person who has a ton of job posts using this plugin. How do I stop it from crashing? Or if I get it to show 100, how can I show the next 100, like paged_2 ?

    The page I need help with: [log in to see the link]

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Contributor Richard Archambault

    (@richardmtl)

    Wow, 1 GB! That is a lot!!

    For paginating the feed, see here:

    https://wordpress.stackexchange.com/questions/108185/pagination-of-rss2-feed

    I’ll ask a developer about the memory question though, I don’t know if it’s avoidable or what. I’ll get back to you when I have a reply.

    Plugin Contributor Richard Archambault

    (@richardmtl)

    Me again! For the memory usage, the developer says that it sounds about right that you’re getting that (1GB), so there’s nothing to be done for it.

    However, our developer realized that we don’t support pagination in our RSS feeds, so we’re going to include a high priority patch for it in our next release; thanks so much for bringing this to our attention!

    Meanwhile, here’s what you can do to allow pagination right now:

    
    add_filter( 'job_feed_args', function( $args ) {
        $args['paged'] = absint( get_query_var( 'paged', 1 ) );
        $args['posts_per_page'] = absint( min( 20, get_query_var( 'posts_per_page', 10 ) ) );
        return $args;
    } );
    

    The 20 is the number of posts per page; you can change it to 100 or whatever number you’d like.

    And then you can query the feed like my link showed you:

    https://example.com/?feed=job_feed&posts_per_page=10&paged=1

    Plugin Contributor Richard Archambault

    (@richardmtl)

    And for completeness, here’s the open issue for this that the developer created this morning:

    https://github.com/Automattic/WP-Job-Manager/issues/1369

    Thread Starter JICCarrier

    (@jiccarrier)

    Awesome!! Thank you so much.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Memory crash when trying to show all jobs in RSS’ is closed to new replies.