freelance84 Posted March 29, 2012 Share Posted March 29, 2012 I have a remote CMS i've built for a small web design company... originally started on a tiny 1&1 shared server with 16mb of RAM for general testing purposes. The application running on this tiny memory is now crashing my server when working on photo's over around 1.2meg. The memory exhaustion is coming when I try to thumbnail, crop or generally run the image into an image source, on anything over around a 1.2meg photo. This is line causing the crash (or png or gif depending on the upload type): $this->image = imagecreatefromjpeg($filename); I appreciate that this question will most likely assume the typical reply of 'how long is a piece of string'... but, I have a predicted number of clients by the end of the year of around 50 each with full access to the ability of resizing, cropping... etc etc images. The budget is tight and I obviously don't want to go overkill but at the same time I don't want to upgrade to something that will fall short in another few months... Does anyone have experience in handling a server which manipulates photos of up to 4meg for a relatively small customer base of 40 - 100? At the moment i'm considering a moving over to either: A cloud starting on 256mb ram with rackspace or A vps with fasthosts starting at a gig of ram.. Quote Link to comment Share on other sites More sharing options...
kicken Posted March 29, 2012 Share Posted March 29, 2012 If your going to be doing lots of photo manipulation then you'll need a good size chunk of ram. Image resolution will determine the amount of memory you need more so than file size. When you load the image into GD to do the manipulation it is stored in memory uncompressed. Uncompressed you need about 4 bytes per pixel so for example a simple 800x600 image is 480,000 pixels at 4bytes each is 1.83 megs. If your talking about images around 4meg in size compressed then your probably taking high-resolutions such as 4288x3216 which would be 13,790,208 pixels and 52meg of ram to load the image, plus a little overhead for processing. What you'll need to consider is what kind of load you think you might have concurrently. If you only have one or two people doing these operations at the same time you'll not need as much as if you have say 10 or more. Quote Link to comment Share on other sites More sharing options...
freelance84 Posted March 29, 2012 Author Share Posted March 29, 2012 Thanks Kicken. Thats exactly the kind of info i've been searching for. Yea basically, one of the clients is wanting to upload pics straight from a dslr which outputs huge high res jpegs.. without a crystal ball i guess it is impossible to tell really the number of uploads per one time, but if i only get 4 clients using the photo gallery option and any one time i'm kinda screwed. Ok, thanks for the info. I'm going fork out for the bigger ram starting at 1gig and see how it goes.. (i can instruct users to upload smaller images, but that would annoy me so..) Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.