2

I have a Drupal 7 site, mainly used to showcase pictures. I am currently using 'views galleriffic' to display the pictures in a view. I attatch them to a unlimited value imagefield in my gallery node via 'filefield sources' with 'plupload' integration. This works awesome with galleries around 100 images. If I try to upload more than 300 I get problems with my php memory, when viewing the node. I suspect this could be a problem because the images get resized using image styles, but I'm not sure.

Another problem even with smaller galleries is, that the imagestyles are generated on first view, so I have to manually view every Image before publishing. Is there a way to automate this?

Any Ideas?

EDIT: If I page the gallery with views it works, but this is not really optimal because the gallery itself has a pager, so the users will get confused with 2 pagers.

EDIT2:

Whole Error Message (I pulled it from apache error log):

[Wed Nov 14 18:14:05 2012] [error] [client 127.0.0.1] PHP Fatal error:  Allowed memory size of 94371840 bytes exhausted (tried to allocate 36 bytes) in XXXXX\\www\\modules\\field\\field.default.inc on line 231, referer: http://127.0.0.1/content/BilderUebersicht
[Wed Nov 14 18:14:05 2012] [error] [client 127.0.0.1] PHP Stack trace:, referer: http://127.0.0.1/content/BilderUebersicht
[Wed Nov 14 18:14:05 2012] [error] [client 127.0.0.1] PHP   1. {main}() XXXXX\\www\\index.php:0, referer: http://127.0.0.1/content/BilderUebersicht
[Wed Nov 14 18:14:05 2012] [error] [client 127.0.0.1] PHP   2. menu_execute_active_handler() XXXXX\\www\\index.php:21, referer: http://127.0.0.1/content/BilderUebersicht
[Wed Nov 14 18:14:05 2012] [error] [client 127.0.0.1] PHP   3. call_user_func_array() XXXXX\\www\\includes\\menu.inc:517, referer: http://127.0.0.1/content/BilderUebersicht
[Wed Nov 14 18:14:05 2012] [error] [client 127.0.0.1] PHP   4. page_manager_node_view_page() XXXXX\\www\\includes\\menu.inc:517, referer: http://127.0.0.1/content/BilderUebersicht
[Wed Nov 14 18:14:05 2012] [error] [client 127.0.0.1] PHP   5. ctools_context_handler_render() XXXXX\\www\\sites\\all\\modules\\ctools\\page_manager\\plugins\\tasks\\node_view.inc:97, referer: http://127.0.0.1/content/BilderUebersicht
[Wed Nov 14 18:14:05 2012] [error] [client 127.0.0.1] PHP   6. ctools_context_handler_render_handler() XXXXX\\www\\sites\\all\\modules\\ctools\\includes\\context-task-handler.inc:44, referer: http://127.0.0.1/content/BilderUebersicht
[Wed Nov 14 18:14:05 2012] [error] [client 127.0.0.1] PHP   7. panels_panel_context_render() XXXXX\\www\\sites\\all\\modules\\ctools\\includes\\context-task-handler.inc:121, referer: http://127.0.0.1/content/BilderUebersicht
[Wed Nov 14 18:14:05 2012] [error] [client 127.0.0.1] PHP   8. panels_render_display() XXXXX\\www\\sites\\all\\modules\\panels\\plugins\\task_handlers\\panel_context.inc:299, referer: http://127.0.0.1/content/BilderUebersicht
[Wed Nov 14 18:14:05 2012] [error] [client 127.0.0.1] PHP   9. panels_display->render() XXXXX\\www\\sites\\all\\modules\\panels\\panels.module:1077, referer: http://127.0.0.1/content/BilderUebersicht
[Wed Nov 14 18:14:05 2012] [error] [client 127.0.0.1] PHP  10. panels_renderer_standard->render() XXXXX\\www\\sites\\all\\modules\\panels\\panels.module:748, referer: http://127.0.0.1/content/BilderUebersicht
[Wed Nov 14 18:14:05 2012] [error] [client 127.0.0.1] PHP  11. panels_renderer_standard->render_layout() XXXXX\\www\\sites\\all\\modules\\panels\\plugins\\display_renderers\\panels_renderer_standard.class.php:356, referer: http://127.0.0.1/content/BilderUebersicht
[Wed Nov 14 18:14:05 2012] [error] [client 127.0.0.1] PHP  12. panels_renderer_standard->render_panes() XXXXX\\www\\sites\\all\\modules\\panels\\plugins\\display_renderers\\panels_renderer_standard.class.php:385, referer: http://127.0.0.1/content/BilderUebersicht
[Wed Nov 14 18:14:05 2012] [error] [client 127.0.0.1] PHP  13. panels_renderer_standard->render_pane() XXXXX\\www\\sites\\all\\modules\\panels\\plugins\\display_renderers\\panels_renderer_standard.class.php:457, referer: http://127.0.0.1/content/BilderUebersicht
[Wed Nov 14 18:14:05 2012] [error] [client 127.0.0.1] PHP  14. panels_renderer_standard->render_pane_content() XXXXX\\www\\sites\\all\\modules\\panels\\plugins\\display_renderers\\panels_renderer_standard.class.php:476, referer: http://127.0.0.1/content/BilderUebersicht
[Wed Nov 14 18:14:05 2012] [error] [client 127.0.0.1] PHP  15. ctools_content_render() XXXXX\\www\\sites\\all\\modules\\panels\\plugins\\display_renderers\\panels_renderer_standard.class.php:541, referer: http://127.0.0.1/content/BilderUebersicht
[Wed Nov 14 18:14:05 2012] [error] [client 127.0.0.1] PHP  16. views_content_views_panes_content_type_render() XXXXX\\www\\sites\\all\\modules\\ctools\\includes\\content.inc:280, referer: http://127.0.0.1/content/BilderUebersicht
[Wed Nov 14 18:14:05 2012] [error] [client 127.0.0.1] PHP  17. view->preview() XXXXX\\www\\sites\\all\\modules\\ctools\\views_content\\plugins\\content_types\\views_panes.inc:279, referer: http://127.0.0.1/content/BilderUebersicht
[Wed Nov 14 18:14:05 2012] [error] [client 127.0.0.1] PHP  18. views_plugin_display->preview() XXXXX\\www\\sites\\all\\modules\\views\\includes\\view.inc:1360, referer: http://127.0.0.1/content/BilderUebersicht
[Wed Nov 14 18:14:05 2012] [error] [client 127.0.0.1] PHP  19. view->render() XXXXX\\www\\sites\\all\\modules\\views\\plugins\\views_plugin_display.inc:2673, referer: http://127.0.0.1/content/BilderUebersicht
[Wed Nov 14 18:14:05 2012] [error] [client 127.0.0.1] PHP  20. view->execute() XXXXX\\www\\sites\\all\\modules\\views\\includes\\view.inc:1184, referer: http://127.0.0.1/content/BilderUebersicht
[Wed Nov 14 18:14:05 2012] [error] [client 127.0.0.1] PHP  21. view->_post_execute() XXXXX\\www\\sites\\all\\modules\\views\\includes\\view.inc:1156, referer: http://127.0.0.1/content/BilderUebersicht
[Wed Nov 14 18:14:05 2012] [error] [client 127.0.0.1] PHP  22. views_handler_field_field->post_execute() XXXXX\\www\\sites\\all\\modules\\views\\includes\\view.inc:744, referer: http://127.0.0.1/content/BilderUebersicht
[Wed Nov 14 18:14:05 2012] [error] [client 127.0.0.1] PHP  23. views_handler_field_field->set_items() XXXXX\\www\\sites\\all\\modules\\views\\modules\\field\\views_handler_field_field.inc:683, referer: http://127.0.0.1/content/BilderUebersicht
[Wed Nov 14 18:14:05 2012] [error] [client 127.0.0.1] PHP  24. field_view_field() XXXXX\\www\\sites\\all\\modules\\views\\modules\\field\\views_handler_field_field.inc:845, referer: http://127.0.0.1/content/BilderUebersicht
[Wed Nov 14 18:14:05 2012] [error] [client 127.0.0.1] PHP  25. _field_invoke_default() XXXXX\\www\\modules\\field\\field.module:898, referer: http://127.0.0.1/content/BilderUebersicht
[Wed Nov 14 18:14:05 2012] [error] [client 127.0.0.1] PHP  26. _field_invoke() XXXXX\\www\\modules\\field\\field.attach.inc:386, referer: http://127.0.0.1/content/BilderUebersicht
[Wed Nov 14 18:14:05 2012] [error] [client 127.0.0.1] PHP  27. field_default_view() XXXXX\\www\\modules\\field\\field.attach.inc:209, referer: http://127.0.0.1/content/BilderUebersicht
[Wed Nov 14 18:14:05 2012] [error] [client 127.0.0.1] PHP  28. array_merge() XXXXX\\www\\modules\\field\\field.default.inc:231, referer: http://127.0.0.1/content/BilderUebersicht

Fatal error: Allowed memory size of 94371840 bytes exhausted (tried to allocate 36 bytes) in XXXXX\www\modules\field\field.default.inc on line 231
  • Can you provide the exact error message that you got when viewing node with 300 images. – Eugene Fidelin Nov 14 '12 at 8:49
  • First i got in trouble with php max_input_vars (was set to 1000, increased it to 5000), now I have too little memory_limit (it's set to 90MB and I CAN'T increase it) – Tom Nov 14 '12 at 10:37
  • Error message contains script name that tries to allocate this memory - please provide its name. – Eugene Fidelin Nov 14 '12 at 13:33
  • @EugeneFidelin I added the error log to the main post. – Tom Nov 15 '12 at 15:25
  • Seems problem is in formatter function that outputs images on node page. What are original sizes of images in pixels and MB? Maybe you need to optimize images before uploading on server. This will reduce required memory for their cropping and scaling. – Eugene Fidelin Nov 16 '12 at 10:53

Browse other questions tagged or ask your own question.