Gallery Thumbnails - OutOfMemory exception

rated by 0 users
Not Answered This post has 0 verified answers | 3 Replies | 2 Followers

Rhys Godfrey
Not Ranked
6 Posts
Points 120
By: Rhys Godfrey
Posted: Tue, Jul 1 2008 1:40 PM

Hi,

I've got a site running CS2007, when browing thumbnails in a gallery the thumbnail isn't displayed for some images.

After a bit of digging around and adding some error logging in it appears that the problem is caused by this line in CommunityServer.Galleries.Components.ImageHandling:

Bitmap image = (Bitmap)Bitmap.FromStream(pictureData.Content, true);

Which is throwing an Out Of Memory exception. The images its trying to resize are reasonably large (upwards of 1.5mb).

Any ideas of a fix/workaround to stop this happening.

Thanks,

Rhys


 

All Replies

Alex Crome
Top 10 Contributor
2,782 Posts
Points 41,115
TelligentSupportTeam
By: Alex Crome
Posted: Tue, Jul 1 2008 1:42 PM In reply to

What type of webhosting are you usign - VPS, Dedicated server or shared hosting?

The error you're seeing suggests that the server on which CS is running does not have enough available fre ememory to resize the image.  You may wish to look at either upgrading your server to have more ram, or to upload smaller images.

 
  • Post Points: 20 |
Rhys Godfrey
Not Ranked
6 Posts
Points 120
By: Rhys Godfrey
Posted: Tue, Jul 1 2008 1:51 PM In reply to

The site is running on two dedicated servers (One DB Machine, One Web Machine) - the web machine has 3.25GB of ram and 3.25GHz CPU - the site does have a very large amount of users/traffic though - but generally runs between 25% and 40% CPU usage with around a 1GB Page File Usage. So don't think resizing a couple of megs worth of image would cause that big a problem.

Rhys


 
  • Post Points: 20 |
Alex Crome
Top 10 Contributor
2,782 Posts
Points 41,115
TelligentSupportTeam
By: Alex Crome
Posted: Tue, Jul 1 2008 2:13 PM In reply to

You said your site effectively has 4.25gb memory to play with (3.25Gb + 1Gb page file).  What percentage of the memory is typically in use.  If it's typically at 95%, then CS running out of memory when resizing an image would not be a suprising result.

 
  • Post Points: 5 |
Page 1 of 1 (4 items) | RSS
Powered by Community Server (Commercial Edition), by Telligent Systems

Copyright© 2008 Telligent Systems Inc. All rights reserved
CommunityServer.com  •  Telligent.com