-
Notifications
You must be signed in to change notification settings - Fork 22
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Handle very large feeds #1040
Comments
Yikes, I'm not sure why a site would have a 9.5MB feed, but this is a server-level setting. PressForward can't change the allowed memory size of a server's PHP configuration. |
@stakats We can use |
It should be possible to load a large file in chunks as this plugin does: https://en-gb.wordpress.org/plugins/tuxedo-big-file-uploads/ - in theory, the steps would be (1) detect memory limit reached (2) handle error (3) switch to large file upload. Of course, processing a file of that size is another matter altogether. It might be best just to gracefully acknowledge the error and mark the feed as broken? I've checked the feed OP mentioned. I have no idea what they are doing but their embed code (they are using on the blog) is something else. (VERY heavy). Never seen anything like it before. |
As suggested by @lordmatt, the issue here is not really the fetching of the XML file, but the parsing of that file. There are some PHP libraries for reading XML files in chunks, and PHP natively has the As such, the only viable way forward is to move away from SimplePie. I'm having a hard time finding a PHP library that uses So, for the time being, I think it'll have to be a documented issue: If you have problems with your server conking out due to large feeds, you'll have to use WP's tools for increasing memory limit (ie the |
A very large feed will hang retrieval with
PHP Fatal error: Allowed memory size of NNNNNNN bytes exhausted (tried to allocate NNNNNNNNN bytes) in /websites/dhnow/www/wp-includes/wp-db.php on line 1978
.See, for example, the feed at http://kbender.blogspot.com/feeds/posts/default which is 9.5MB
The text was updated successfully, but these errors were encountered: