Hi,

I am having problem with Image Styles not creating thumbnail, large or medium (the default) images from an original image. Here is the error I'm getting:

Fatal error: Out of memory (allocated 77856768) (tried to allocate 17280 bytes) in /home/ld/public_html/modules/system/image.gd.inc on line 237

I have a feeling the problem may be to do with the images resolution of 4320x3240.

Thanks for any help,

Shaun

Comments

marcingy’s picture

Category: bug » support

You need to increase your server memory - see http://drupal.org/node/76156

ShaunP1989’s picture

Thanks for your pointer, I tried this, even increasing memory up to 1024M! And I am still getting exactly the same error message :(

Shaun

ShaunP1989’s picture

Ok just tested it out with an old product photo which has smaller dimensions (2448x3264) and everything is working fine. Which leads me to think it is an issue with the dimensions as the size of the OLD photo is 3.4M, and the size of the NEW photo is 1.4M. So the photos I'm having issues with are larger in dimension but smaller in size.

Now the obvious solution is for me to go and resize all my photos and re upload them. However the issue would still remain for others. So perhaps someone does have a solution to this.

Shaun

clearwaternazarene’s picture

After updating to dev versions of views,date and media receive the following error when trying to bring up the media form to select media for a new page entry.
No files were selected because the form was not loaded.
Fatal error: Out of memory (allocated 57671680) (tried to allocate 17152 bytes) in /modules/system/image.gd.inc on line 237

The error I used to get in Media when clicking on the "Select media" button and then clicking on Library option for uploading new media is "Error getting media".

Views 7.x-3.1+83-dev
Date 7.x-2.1+11-dev
Media 7.x-2.0-unstable3+24-dev
Field entity 7.x-2.0-unstable3+16-dev

mattsmith3’s picture

same issue here. I can't even load the form. on drupal 7.2, same modules as above but without field entity.

yevgeny.ananin’s picture

I'm getting the same error message. In my photo gallery content type, I have the image field set to accept a maximum image resolution of 3000 x 3000 pixels. I was under the impression that if the user tried to upload an image with a larger resolution then it would be automatically resized; instead the user gets the ajax error described above (fatal error: out of memory.....image.gd.inc on line 237).

This didn't use to happen, Drupal used to resize the images! I can't ask my client to manually resize every image that they want to upload! I recently ran a bunch of updates, including Drupal core, and the error seems to have showed up only after the changes. So I don't even know which module to roll back to make this work again.

Oh, and I've tried memory-related fixes that were suggested in this and other forums - modifying settings.php with ini_set('memory_limit', '512M') as well as changing settings in a php.ini file that I created. Non of these changes have affected the problem one bit.

ckrina’s picture

Same here in two sites. I've changed the 'memory_limit' to '1024M' for both and still have the problem. This started after upgrading Core (7.14), Media (latest) and other modules some weeks ago, but I can't find wich of them is. With older versions I did not have this problem. I'm going to set the limit size to upload in 750kb, but I think it should'nt be the end solution. I wish I could provide a solution myself, but my knowledge is limited.

yevgeny.ananin’s picture

Update

So....I thought that I was increasing my php memory limit. I changed my settings.php file, as I mentioned in my post above. When I checked phpinfo(), the changes were reflected. That is, when I went to reports/status-report it said that my php memory had in fact increased after I changed my settings.php file. However, when I called 1&1 (my shared hosting provider) they said that despite what is stated in my phpinfo() page, they cap my upper php memory limit at 80MB. So, despite any efforts I made by adding a php.ini file or changing my settings.php file, 1&1 was actually overriding any changes I made and restricting my php memory usage. Oh, and 80MB is the most php memory that they offer for any of their shared hosting plans!

So, after I moved the website to a local server at my office, all the problems went away. Our client was able to upload images, and the images were being automatically resized without throwing any memory errors.

dddave’s picture

Status: Active » Closed (works as designed)
arruk’s picture

I know I am commenting on an old closed thread, but since I just had to fix the same problem today I thought I would share that I resolved it by running cron. I was them able to load the offending page, but with an error message said that resize had maxed out its 5 per minute limit. If this does not clear up in the next couple of hours on its own, I'll just run a script to load and save every node, which should force the images to resize.

-=Daniel=-