How does thumbnail generation work?

Permalink Browser Info Environment
I handle a LOT of images. Right now I'm having a big problem with C5 5.7, and there's a ticket on github about it. If too many thumbnails are trying to be generated at once, it causes runaway memory problems.

Does your gallery try to generate thumbnails all at once from a set, or will it only generate a few at a time and manage the impact to the server?

Type: Pre-Sale
Status: In Progress
Anticept
View Replies:
shahroq replied on at Permalink Reply
shahroq
Hi,
I'm not sure, how many images do u want to select? What is currently happening is get all fileID s of a file set, then generate thumbnails one by one.
Anticept replied on at Permalink Reply
Anticept
Here's my old 5.6 site that I've kept archived, and I linked to an image gallery that only generates displayed images instead of the whole set (amiant image gallery -http://www.concrete5.org/marketplace/addons/amiant-image-gallery/).... By limiting to 8 per page, it doesn't bring the server to its knees if there are some thumbnails that are not already generated.

http://www.conc56.newflyers.net/index.php/gallery/n566fd-gallery/...


On the other hand, on my 5.7 site, I had to edit all of my images and down sample them because even rescanning 2-3 was causing my VPS to run out of memory.

http://www.newflyers.net/gallery/n566fd...


I need to know if I can set up your gallery to only display a few images per page, and it ONLY generate thumbnails (if not already cached) for images on the current page. Right now, if I start adding more images to the N566FD set, I have to break it up into several pages and several sets, which is a pain in the butt.
shahroq replied on at Permalink Reply
shahroq
Hi,
Galleria has an option to set number of images to preload in advanced:
Preload: Defines how many images Galleria should preload in advance. Please note that this only applies when you are using separate thumbnail files. Galleria always cache all preloaded images. 2: preloads the next 2 images in line, ‘all’: forces Galleria to start preloading all images. This may slow down client. 0: will not preload any images.
Anticept replied on at Permalink Reply
Anticept
Hey sorry, been really busy.

I don't know if preloading will help or not. Here's the situation: Concrete 5.7 has really poor memory management right now when it comes to thumbnail generation in FastCGI processes (may also be applicable to others). It's caused by the calls to imagemagick to generate the thumbnails, and until thumbnail generation is complete, it doesn't clean up after itself. My github issue ticket was recommending that a queueable task be used instead for each image to mitigate the problem. Also, while imagemagick is being used, no other webserver requests can be served, and that's another issue that I am fighting with.

If cached thumbnails don't already exist, C5 will try to generate them. By using amiant image gallery on my old C5.6 installation, I could limit how many are displayed per page and lower website impact if the cached thumbnails didn't exist.

concrete5 Environment Information

# concrete5 Version
Core Version - 5.7.4.2
Version Installed - 5.7.4.2
Database Version - 20150504000000

# concrete5 Packages
Fundamental (2.0.1), HTML+PHP Code Block (1.0.0), Page Redirect (2.0), Page Selector Attribute (2.0), ProBlog (2.3.1), Search Experience Optimization (1.2.1), Thumb Gallery (1.0.3).

# concrete5 Overrides
languages/da_DK/LC_MESSAGES/messages.mo, languages/da_DK/LC_MESSAGES, languages/da_DK, languages/de_DE/LC_MESSAGES/messages.mo, languages/de_DE/LC_MESSAGES, languages/de_DE, languages/el_GR/LC_MESSAGES/messages.mo, languages/el_GR/LC_MESSAGES, languages/el_GR, languages/fi_FI/LC_MESSAGES/messages.mo, languages/fi_FI/LC_MESSAGES, languages/fi_FI, languages/fr_FR/LC_MESSAGES/messages.mo, languages/fr_FR/LC_MESSAGES, languages/fr_FR, languages/it_IT/LC_MESSAGES/messages.mo, languages/it_IT/LC_MESSAGES, languages/it_IT, languages/ja_JP/LC_MESSAGES/messages.mo, languages/ja_JP/LC_MESSAGES, languages/ja_JP, languages/nl_NL/LC_MESSAGES/messages.mo, languages/nl_NL/LC_MESSAGES, languages/nl_NL, languages/pl_PL/LC_MESSAGES/messages.mo, languages/pl_PL/LC_MESSAGES, languages/pl_PL, languages/pt_BR/LC_MESSAGES/messages.mo, languages/pt_BR/LC_MESSAGES, languages/pt_BR, languages/ru_RU/LC_MESSAGES/messages.mo, languages/ru_RU/LC_MESSAGES, languages/ru_RU, languages/sl_SI/LC_MESSAGES/messages.mo, languages/sl_SI/LC_MESSAGES, languages/sl_SI, languages/sv_SE/LC_MESSAGES/messages.mo, languages/sv_SE/LC_MESSAGES, languages/sv_SE, languages/tr_TR/LC_MESSAGES/messages.mo, languages/tr_TR/LC_MESSAGES, languages/tr_TR, languages/da_DK/LC_MESSAGES/messages.mo, languages/da_DK/LC_MESSAGES, languages/da_DK, languages/de_DE/LC_MESSAGES/messages.mo, languages/de_DE/LC_MESSAGES, languages/de_DE, languages/el_GR/LC_MESSAGES/messages.mo, languages/el_GR/LC_MESSAGES, languages/el_GR, languages/fi_FI/LC_MESSAGES/messages.mo, languages/fi_FI/LC_MESSAGES, languages/fi_FI, languages/fr_FR/LC_MESSAGES/messages.mo, languages/fr_FR/LC_MESSAGES, languages/fr_FR, languages/it_IT/LC_MESSAGES/messages.mo, languages/it_IT/LC_MESSAGES, languages/it_IT, languages/ja_JP/LC_MESSAGES/messages.mo, languages/ja_JP/LC_MESSAGES, languages/ja_JP, languages/nl_NL/LC_MESSAGES/messages.mo, languages/nl_NL/LC_MESSAGES, languages/nl_NL, languages/pl_PL/LC_MESSAGES/messages.mo, languages/pl_PL/LC_MESSAGES, languages/pl_PL, languages/pt_BR/LC_MESSAGES/messages.mo, languages/pt_BR/LC_MESSAGES, languages/pt_BR, languages/ru_RU/LC_MESSAGES/messages.mo, languages/ru_RU/LC_MESSAGES, languages/ru_RU, languages/sl_SI/LC_MESSAGES/messages.mo, languages/sl_SI/LC_MESSAGES, languages/sl_SI, languages/sv_SE/LC_MESSAGES/messages.mo, languages/sv_SE/LC_MESSAGES, languages/sv_SE, languages/tr_TR/LC_MESSAGES/messages.mo, languages/tr_TR/LC_MESSAGES, languages/tr_TR

# concrete5 Cache Settings
Block Cache - On
Overrides Cache - On
Full Page Caching - Off
Full Page Cache Lifetime - Only when manually removed or the cache is cleared.

# Server Software
Apache

# Server API
cgi-fcgi

# PHP Version
5.6.4

# PHP Extensions
bcmath, bz2, calendar, cgi-fcgi, Core, ctype, curl, date, dom, ereg, exif, filter, ftp, gd, gettext, hash, iconv, imagick, imap, json, libxml, mbstring, mcrypt, memcached, mhash, mysql, mysqli, mysqlnd, openssl, pcntl, pcre, PDO, pdo_mysql, pdo_sqlite, posix, pspell, Reflection, session, SimpleXML, soap, sockets, SPL, sqlite3, standard, tokenizer, XCache, XCache Cacher, XCache Coverager, XCache Disassembler, XCache Optimizer, xml, xmlreader, xmlrpc, xmlwriter, xsl, zip, zlib.

# PHP Settings
max_execution_time - 30
log_errors_max_len - 1024
max_file_uploads - 20
max_input_nesting_level - 64
max_input_time - -1
max_input_vars - 1000
memory_limit - 256M
post_max_size - 65M
sql.safe_mode - Off
upload_max_filesize - 64M
memcached.sess_lock_max_wait - 0
mysql.max_links - Unlimited
mysql.max_persistent - Unlimited
mysqli.max_links - Unlimited
mysqli.max_persistent - Unlimited
pcre.backtrack_limit - 1000000
pcre.recursion_limit - 100000
session.cache_limiter - <i>no value</i>
session.gc_maxlifetime - 1440
soap.wsdl_cache_limit - 5
xcache.var_maxttl - 0

Browser User-Agent String

Mozilla/5.0 (Windows NT 6.3; WOW64; rv:38.0) Gecko/20100101 Firefox/38.0

Hide Post Content

This will replace the post content with the message: "Content has been removed by an Administrator"

Hide Content

Request Refund

You have not specified a license for this support ticket. You must have a valid license assigned to a support ticket to request a refund.