omeka-s-modules / Omeka2Importer

Import items from an Omeka 2 site into Omeka S
GNU General Public License v3.0
3 stars 4 forks source link

Handle memory limits #45

Closed patrickmj closed 7 years ago

patrickmj commented 9 years ago

From #42 testing, a large file runs over the memory limit:

PHP Fatal error:  Allowed memory size of 134217728 bytes exhausted (tried to allocate 1964801 bytes) in /websites/omekadev/home/www/omeka-s/application/src/File/Thumbnailer/GdThumbnailer.php on line 174

Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 1964801 bytes) in /websites/omekadev/home/www/omeka-s/application/src/File/Thumbnailer/GdThumbnailer.php on line 174
PHP Warning:  session_write_close(): open(/websites/chnmdev/var/phpsessions/sess_0qoort26ars5v670v8p22bdgf5, O_RDWR) failed: Permission denied (13) in /websites/omekadev/home/www/omeka-s/vendor/zendframework/zend-session/src/SessionManager.php on line 204

Example file: http://dev.omeka.org/mebrett/Omeka/items/show/501

zerocrates commented 9 years ago

Relevant note: you're using the GdThumbnailer, and it has to load the whole file in memory (probably actually even the whole bitmap, which is worse) to make a thumbnail of it.

The external imagemagick thumbnailer won't be as memory-constrained because it does its work on the image in a separate process.

patrickmj commented 8 years ago

Need to re-test with @mebrett 's big import on omeka-dev to see if the new fix (the one that doesn't cause #46) works.