Community @ The Turning Gate

Support community for TTG plugins and products.

NOTICE

The Turning Gate's Community has moved to a new home, at https://discourse.theturninggate.net.

This forum is now closed, and exists here as a read-only archive.

  • New user registrations are disabled.
  • Users cannot create new topics.
  • Users cannot reply to existing topics.

You are not logged in.

#1 2018-09-12 09:21:27

dleifer
Member
From: Brookline, MA - USA
Registered: 2016-10-28
Posts: 8

Memory Error on Album Page. Is there a max number of files / album?

I have been making albums through the LightRoom Publish Services and have been very happy with the results. I had one particularly large gallery (1300 images), set to paginate every 250 images. I got to the point where the gallery was being "Published". While it was still in progress (uploading) I checked the gallery live around 500 images and everything was looking fine. Came back and checked again after the entire gallery was published and saw this error message:

Something went wrong
 
Unexpected error: Allowed memory size of 33554432 bytes exhausted (tried to allocate 20480 bytes) in PdoExtended.php on line 158 
 
Please report error at http://community.theturninggate.net

Double checked all my settings for the Album in LightRoom and my settings through the BackLight web interface and everything seemed the same as other galleries that worked fine. I deleted the album, rebuilt it and had the same experience. This time I saw it around 800 images and all was fine. But, when completed I saw the same error message.

See a number of my galleries (all, but one working fine) here.
And the problem gallery page here.

Is there a max limit to the number of images in an Album?

I believe I see "PdoExtened.php" at:  backlight > installer > lib > PdoExtended.php
Is there a way to modify that (or another) file to allocate more memory? Is that really the problem?

Please let me know if you need a Guest Log-in. I host with BlueHost. I am running PHP 7.1.21

Thank you in advance for any help and for a great product.

David

Offline

#2 2018-09-12 09:28:16

Ben
Moderator
From: Melbourne, Australia
Registered: 2012-09-29
Posts: 4,399

Re: Memory Error on Album Page. Is there a max number of files / album?

Hi David, it looks like you're coming up against a memory limit.  This would be due to a combination of the size of all the related data of the large number of images, and possibly memory leaks in our code.  Are you able to increase your allowed ram above 32MB?  64 or 128 may help to solve this.  I'll add a review of memory optimisation to my task list.

Thanks for your kinds words about our product.

Offline

#3 2018-09-12 09:29:52

dleifer
Member
From: Brookline, MA - USA
Registered: 2016-10-28
Posts: 8

Re: Memory Error on Album Page. Is there a max number of files / album?

Remembered that these are all Private galleries. Please use:

Email: nl@nlamberg.com
Password:  Summer

Let me know if you need Admin credentials as well.

Thank you,

David

Offline

#4 2018-09-12 09:37:20

dleifer
Member
From: Brookline, MA - USA
Registered: 2016-10-28
Posts: 8

Re: Memory Error on Album Page. Is there a max number of files / album?

Ben,

Thank you for a ridiculously fast response!

I was about to ask you if you can see the server memory allocation or were just making an assumption. But I see it's available on the View PHP Info page. You guys are smart! OK, I am going to see if I can get the Apache memory allocation up and in the mean time I am going to try splitting the big album in to two pieces and see if that works for now.

I will post an update here on both.

Thank you,

David

Offline

#5 2018-09-12 09:44:34

Ben
Moderator
From: Melbourne, Australia
Registered: 2012-09-29
Posts: 4,399

Re: Memory Error on Album Page. Is there a max number of files / album?

Hi David, glad to have been able to answer promptly.  The programmer in me took the number 33554432 and divided it by 1024 twice to come up with 32MB smile  Do let us know how both the memory increase and splitting go. 
I'm aware that the backend uses more memory than it should, by passing data in a way that causes it to be duplicated in RAM.  I've removed a lot of that copying for the templating system, but it looks like I also need to review that for album handling.  To date this hasn't impacted users in the way that you've encountered.

Offline

#6 2018-09-12 13:27:15

dleifer
Member
From: Brookline, MA - USA
Registered: 2016-10-28
Posts: 8

Re: Memory Error on Album Page. Is there a max number of files / album?

Hi Ben,

Success on both fronts.

I split the large (1300+) album into two albums (~650 each) and they worked fine. So 32MB of memory gets you somewhere between 650 and 1300 images in one album.

And then I made a few changes on the server. I upped the memory from 32MB to 64MB. And then I upped the max_execution_time from 30 to 60 seconds. I know there wasn't a time out error, but from other php script experience I have found 30 seconds can cut a lot of operations off, so I thought I would be safe and give it more headroom while I was making changes. The result is the original (1300+) album is now working fine. So, now you don't have to worry about doing the memory optimization... as soon. smile 

I don't know if it's your policy to officially close threads once a solution is found, but I am happy.

Thanks again,

David
==========================
Photographer - SCUBA Diver - WZ1C

Offline

#7 2018-09-12 13:53:11

Ben
Moderator
From: Melbourne, Australia
Registered: 2012-09-29
Posts: 4,399

Re: Memory Error on Album Page. Is there a max number of files / album?

Hi David, thanks for trying out those two options - that's very helpful.  I still don't like the idea of using too much memory so will try and look into this.  Another suggestion I was going to make was to upgrade to PHP 7.*, since that uses a lot less memory than 5.6, but you're already using 7.1.

We don't usually close topics.

Offline

Board footer

Powered by FluxBB