Control Number of Posts to Pull Each Time Process Is Run

Is there a way to limit Autoblog to only pull the most recent post in a feed, not ALL of them?

Thanks!

  • Arun Basil Lal

    Hello marcusc,

    Autoblog is intended to import posts from the feed automatically over time. You give a feed, and when something new comes up in the feed, its imported automatically.

    What do you mean by importing the most recent post? When a new post comes in that will be the most recent post and what happens to the old one?

    If you are talking about the first time, and you wish to run this only once, why not copy paste the item manually instead of going through all the trouble of setting up the feed?

    I hope you see my point. Please let me know if this is not what you mean, there should always be a work around :wink:

  • marcusc

    Hi Arun,

    Thank you for the reply. The issue I have is that the feed I want to use has 20 posts in it. By default when you run this plugin it retrieves all 20 the first time. This causes the hosting account to return a 500 error from too many processes (I use Hostgator). There should be a way to limit the first pull to a smaller number, like 3 or 5. I used 1 as an example in my question because I only planned on retrieving the first post in the feed.

    Thanks,
    Marcus

  • aecnu

    Greetings Marcus and Arun,

    The 500 internal server error is almost certainly being caused by the allocated memory for php located in the php.ini file running out.

    Hostgator if I remember correctly sets their php memory limit ( memory_limit ) by default to 32 MB's where as on our servers for comparison this is set at 512 MB's as default. In addition, one reason why Arun may have gotten 17 imports without an error but did not get more posts is because of another imposed limit of how long a php script is allowed to run also defined in the php.ini file by max_execution_time.

    Meaning that the effect is that the php script runs out of time stopping before reaching the memory_limit which triggers the internal server error 500. many hosts set this at 30 and once again for comparison we have ours set at 240.

    With all this in mind this certainly does not offer a solution for your current hosting configuration.

    I have gone ahead and checked the Autoblog plugin for anyway to limit how many posts it imports and have not found any setting that could possibly limit this.

    Therefore Marcus, with your approval I would like to move this to feature requests proposing a way to limit how many posts can be imported in a single event.

    Please advise if this sound good to you.

    Cheers, Joe

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.