Issue with some images

A historical forum for issues reported in the suggestions and bugs forum that have been subsequently fixed or resolved.
Post Reply
User avatar
bekateen
Posts: 8955
Joined: 09 Sep 2014, 17:50
I've donated: $40.00!
My articles: 4
My images: 130
My cats species list: 142 (i:102, k:39)
My aquaria list: 36 (i:13)
My BLogs: 44 (i:149, p:2653)
My Wishlist: 35
Spotted: 177
Location 1: USA, California, Stockton
Location 2: USA, California, Stockton
Contact:

Issue with some images

Post by bekateen »

Hi Jools,

Sorry to bother you, but recently I've started seeing a number of images on CLOG pages (see attachment), on My Fish, and on My Aquaria where the images don't display but instead a broken link placeholder is displayed.

I investigated this for the specific instance shown in the attached photo by trying to view the image directly using its URL (https://www.planetcatfish.com/images/fu ... atus/3.jpg) and I received the following error message:
Fatal error: Allowed memory size of 94371840 bytes exhausted (tried to allocate 24576 bytes) in /home/webcat/planetcatfish.com/common/image_handler.php on line 329
I had this same experience with one of my own "My Fish" photos, and I found that I solved the issue by reducing the size of the image (reducing pixel dimensions) and re-uploading. What is odd to me is that this image in its original (large) size used to display just fine. So I'm wondering if a recent software change has resulted in a max image size limit that gets exceeded and then fails to display the photo.

Cheers, Eric
Attachments
error.jpg
Image
Find me on YouTube and Facebook: http://youtube.com/user/Bekateen1; https://www.facebook.com/Bekateen
Buying caves from https://plecocaves.com? Plecocaves sponsor Bekateen's Fishroom. Use coupon code "bekateen" (no quotes) for 15% off your order.
User avatar
Jools
Expert
Posts: 15978
Joined: 30 Dec 2002, 15:25
My articles: 197
My images: 944
My catfish: 238
My cats species list: 87 (i:13, k:1)
My BLogs: 7 (i:7, p:202)
My Wishlist: 23
Spotted: 447
Location 1: Middle Earth,
Location 2: Scotland
Interests: All things aquatic, Sci-Fi, photography and travel. Oh, and beer.
Contact:

Re: Issue with some images

Post by Jools »

The short reply is that it should be fixed.

The long reply is this is not a bug but a problem caused by the environment in which PlanetCatfish runs. Planet runs on a VPS (Virtual Private Server) which is essentially a really big server set-up to look like several small servers. Each VPS runs all the necessary software that sits between the operating system and the end user to make stuff work. The enviroment is set-up so that one "naughty" server doesn't impinge on the performance of others which they can do becuase they're on the same physical really big server.

I don't tweak that environment much as we move from server to server over time and typically it's a pain to recreate lots of tweaked parameters each time. This particular error was caused the the process running a web session not having enough memory to resize an image. All images on Planet are stored in their original form and presented as a small thumbnail, flipped left or right, watermark added, resized to be a certain size or whatever.

All these transformed images are cached, so this transformation of the original image takes place only once every month assuming the original image has not changed. This keeps server load, and bandwidth consumption, as low as possible. Thereafter the transformed images are used for everything.

However, it means that if an image transformation fails, it typically won't serve any images up for that original. While images are stored in a compressed format (JPEG), they are manipulated in an uncompressed memory and so are HUGE. A 4Mb, 12 megapixel image can easily take up 1/10th Tb - so it breaks. The tricky bit is I don't want to increase the memory for all transformations, but also I don't know the uncompressed image size until I manipulate it (and it keels over). So, I've put something in to guess that an image is likely rather large and then give it a LOT of memory to work in. Keeping an eye on this is important, and it seems to be OK and has not impacted negatively on overall load / performance.

This is several days work to do right - necessary - but also rather invisible to most users of the site.

Jools
User avatar
bekateen
Posts: 8955
Joined: 09 Sep 2014, 17:50
I've donated: $40.00!
My articles: 4
My images: 130
My cats species list: 142 (i:102, k:39)
My aquaria list: 36 (i:13)
My BLogs: 44 (i:149, p:2653)
My Wishlist: 35
Spotted: 177
Location 1: USA, California, Stockton
Location 2: USA, California, Stockton
Contact:

Re: Issue with some images

Post by bekateen »

Thanks for the explanation Jools. Dang, life is a lot more complicated when you have to get "under the hood."

Cheers, Eric
Image
Find me on YouTube and Facebook: http://youtube.com/user/Bekateen1; https://www.facebook.com/Bekateen
Buying caves from https://plecocaves.com? Plecocaves sponsor Bekateen's Fishroom. Use coupon code "bekateen" (no quotes) for 15% off your order.
Post Reply

Return to “All Resolved Issues”