Topic: Thumbnail script uses too much memory

Enjoy the possibilities of Showkase since over a year. It is a joy. This week unfortunately problems occurred while uploading new pictures to my website. Caused by the thumbnail script that used more than the maximum of 96 MB. My provider was very friendly and for me they raised the max to 128 MB. Because of their "shared hosting" they cannot go beyond that.

The provider suggested I could reduce the pictures first, before I upload them to the site, but that will often be at the expense of quality. In addition, also that approach will eventually (after uploading more photos) result in exceeding the maximum memory for the thumbnail.php script lead.

I don't know what this file thumbnail.php script does exactly, on which it is based, etc. Therefore, I have no idea how I can affect this. It can't be the size of thumbs; I see at least no large files in the appropriate folder. Maybe this script works continuously for all thumbnails? Or can it be set to only use memory at the time of requesting thumbs it is active?

Until today I used the Showkase Pro version 1.0.2. After I got this problem with the thumbnail script I found out there is a version 1.3.2, which is now installed.

Appreciate your help!

Re: Thumbnail script uses too much memory

Thank you for reporting this issue.
At the moment, I do not know if there is anything that can be done to minimize memory usage within Showkase but I have notified the developers who will certainly investigate further.
Out of interest, how many galleries and images (approximately) did you have in your Showkase site when you first ran into the problem?

Re: Thumbnail script uses too much memory

Thank you Steven for your quick reply. Gives a good feeling especially on a Saturday.

Enjoy your free hours today and tomorrow!

Re: Thumbnail script uses too much memory

Completely forgot to answer your question. Here it is:
- 7 pages
- 83 photos
- 185 MB

Re: Thumbnail script uses too much memory

Thank you!

Re: Thumbnail script uses too much memory

Some information from my webhosting provider regarding the problem.

The basis of this is in the difference between the various ' resources ' that my package can use, and in particular the difference between "memory", or working memory, and disk usage, or storage space.
My unlimited package means I have unlimited disk usage. This means that I can save as many photos, Web pages, databases, or other data as I want without limit. However my  package has no unlimited working memory. Working memory is the memory that my package can use to compute operations, such as running a PHP script. This allows PHP, and the hosting package up there, a limit, to ensure that a single user on their server can cause no nuisance to other users in using all the memory.
A single script in PHP can claim up to 96 MB working memory. The problem in this case is that the script needs more than 96 MB, and therefore gives an error. To them this is not surprising, because the dynamic modification of image adjustment (making thumbnails) often takes much memory.
To solve this they suggest I myself should create the thumbnails in advance before attempting to upload within the application. In this way, the limit is not reached, and I will get no error more. I informed them that this is not possible with the Showkase application (as far as I know). That's one of the charms of Showkase, taking work out of my hands ;>)

Hope this will help you!

Re: Thumbnail script uses too much memory

According to the PHP documentation, the default value for the memory_limit directive (for the current version of PHP) is 128M but it looks like many web hosts reduce this.
Even if you were to create a gallery (including thumbnails) outside Showkase and then import it (via the 'Site -> Import' functionality), the gallery would then become a genuine Showkase page and you would likely run into the same problem again.
At the moment, the only way around this problem (other than increasing the memory_limit value) would be to manually embed your Juicebox galleries in 'Basic' Showkase pages using the baseUrl method of embedding documented here (although this defeats the purpose of being able to create and manage galleries within the Showkase interface).
In any case, the developers will certainly investigate this issue further to see if anything can be done to prevent this from happening.

Re: Thumbnail script uses too much memory

The way around the problem as you describe it, is not what I had in mind when I bought Showkase Pro. Hope you understand this is not satisfying at all. As my provider granted me 128 MB there is some delay before the problem is there again. Surely hope the developers can come up with a solution shortly.....

Re: Thumbnail script uses too much memory

I understand your frustration with this issue. The developers are currently investigating the problem and I am hopeful that a solution will be forthcoming (although I cannot promise anything at this stage).
I will post back in this thread when I have any more news on the situation.
Thank you for your patience.

Re: Thumbnail script uses too much memory

Steven, it has been two months since the last post. That is a rather long time. Is there still no solution found? Is there any chance the developers will find one within the near future? Have a nice day!

Re: Thumbnail script uses too much memory

Please try upgrading your site to Showkase v1.3.4 (released on 30 September 2014) which has improved memory management. Please see the Version History for a full list of changes between versions. Hopefully this will help.
Instructions for upgrading Showkase can be found here.
(Sorry for not posting back on this one. I seem to have overlooked this thread when v1.3.4 was released.)