Allowed memory size of 268435456 bytes exhausted

Hi @rod_barbee, can you share one of the images that failed? Also, what memory limit are you using?

I’m looking into memory usage, and I’m not getting the same results. A 4032x3024 jpeg causes PHP’s memory usage to increase by 30-40MB. This seems about a third of the memory usage being experienced by Jo Ann when taken the image dimensions into consideration, assuming there’s nothing else gobbling up the memory.

I’ll try to get a picture you tomorrow; I’ve shut things down for the day.
memory_limit is 256M
upload_max_file_size is 64M

Hi @rod_barbee, I have finally got around to trying your sample photo (which is a lovely image!).
It uploads for me without issue, even if I decrease the memory_limit to 32M. I’ve tried both with a photos-for-download size of 9999 and 7000. The former uses an exact copy of the uploaded image while the latter causes PHP to resize the image. Do you have a BL environment setup where this is failing with a memory_limit of 128M?

the php.ini file shows memory_limit at 256M

I’ll test it again once I get a chance

I tried again this morning with two of the images which failed before and they still fail (there’s been one Backlight update since I first experienced this issue).

Checked Backlight’s report on php_info and in Core, memory_limit is 256M

I have a test image that is 5616 x 5616 but saved with high JPEG compression (so it is only 2MB)

I’m sure it’ll work for you, but you’re welcome to try it.

What else could I have done in my site setup or settings that would cause this subset of images to fail?

I tried again too. Still failing uploading those images whether trying to upload singly or as a group.
When trying to upload one at a time, each of them gets to 100% but the circle just keeps on spinning and finally I get the failed upload error
When trying multiples, none of them ever make it to 100% and I get the error.

One observation: when I retry images, the upload progress often jumps quickly to high percentage, like 40% and something like 14MB. I have very slow upload speeds (nominally 0.7 Mbps) so this seems odd, unless some of the previous upload made it and it’s being held someplace??

Just to revisit this old topic: the problem is still there in Backlight 4.1. I thought I’d try it to see, but I sitll get the same error.

For a few images that failed (some that were 5616 x 5616) I made downsized versions at 5k x 5k and they worked fine. I have four examples - three that failed and one that uploaded OK that leave me very puzzled about the source of the problem. It isn’t just the total megapixels - look at the table below

Megapixels Result Dimensions File size

31,539,456 mp - fail 5616 x 5616 15.3MB
41,230,000 mp - fail 10000 x 4123 18.4MB
33,768,000 mp - succeeded 11256 × 3000 22.9MB
29,662,794 mp - fail 7281 x 4074 15.8MB