BCcampus / pressbooks-openstax-import

[UNMAINTAINED] Pressbooks Plugin for OpenStax Textbook Import
GNU General Public License v3.0
5 stars 0 forks source link

dynamically adjust memory allocation for PHP with large files #52

Open bdolor opened 6 years ago

bdolor commented 6 years ago

Description

Large OpenStax books present memory challenges for PHP. If the server configuration is insufficiently resourced, the import will fail. Adjusting this value dynamically could diminish the likelihood of this happening. Values to target:

post_max_size upload_max_size

Needed to get past https://github.com/pressbooks/pressbooks/blob/dev/inc/modules/import/class-import.php#L510

Perhaps also look at:

memory_limit

Expected behaviour

Some assurance of reliability for importing large files from URL.

Actual behaviour

Fatal error: Allowed memory size exhausted

Steps to reproduce the problem

https://cnx.org/exports/0889907c-f0ef-496a-bcb8-2a5bb121717f@2.49.zip/elementary-algebra-2.49.zip

see #50

System Information

bdolor commented 6 years ago

related https://github.com/pressbooks/pressbooks/pull/1211