Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Niklas Hjelm 104 posts 125 karma points
    Apr 07, 2011 @ 09:31
    Niklas Hjelm
    0

    Out of memory on very small image

    Hi

    I have a strange problem with the out of memory error. I've been checking the forums and read that it has todo with app pool size and the size of the image being resized. On this site (working progress) I'm using Imagegen to resize a 128 x 128 image to 90 x 90 and I'm still getting an out of memory error. How come? The funny thing is that the exact same image works a number of times but not in every instance. 

    My app pool is unlimited and if it should run out it swaps to disk. Clearly the issue can't be memory related, can it?

    Best regards / Niklas

  • Douglas Robar 3570 posts 4711 karma points MVP ∞ admin c-trib
    Apr 07, 2011 @ 09:48
    Douglas Robar
    1

    Hi, Niklas,

    The error means just what it says, it is a response from .net that I pass through to give an indication why the image didn't appear. 

    So, a couple questions...

    • What version of ImageGen are you using? I recommend the latest version (2.5.1)
      http://localhost/imagegen.ashx?version
    • Do all images have this problem or only a few images? If a few, is there anything unique about them?
    • Does the problem appear when displaying a lot of resized images on a page (a gallery perhaps) or are you only showing a few resized images at a time? Is the busy or under load when the problem appears?
    • Does the error happen if you request the single image alone, using the nocache param to aid debugging (don't use nocache=true in production)?
      http://localhost/imagegen.ashx?image=my128.jpg&width=90&nocache=true
    • If the above works, delete all 'cached' folders. Does the site work properly now?
    • If you're still having problems, is there any way I can see your site online?

    cheers,
    doug.

  • Niklas Hjelm 104 posts 125 karma points
    Apr 07, 2011 @ 10:14
    Niklas Hjelm
    0

    Hi Doug

    I'm using version 2.5.1.23224. 

    I forgot to post the link http://www.dittnyabadrum.se/badrumsinredning/duschar/duschhorna-rund/linc-diamond-bojd-klarglas/

    http://www.dittnyabadrum.se/umbraco/ImageGen.ashx?image=/media/108360/linc_diamond.jpg&width=90&compression=90&constrain=true

    Do all images have this problem or only a few images? If a few, is there anything unique about them?

    Only a few. In some instances I understand why I get the problem since there very large. 

    Does the problem appear when displaying a lot of resized images on a page (a gallery perhaps) or are you only showing a few resized images at a time? Is the busy or under load when the problem appears?

    In the case above there are many (below 20) on the same image. But on some pages the problem occurs with a smaller amount of images. 

    I'll try to delete the cache folders to see if this helps. 

    Thanks / Niklas

  • Douglas Robar 3570 posts 4711 karma points MVP ∞ admin c-trib
    Apr 07, 2011 @ 10:29
    Douglas Robar
    0

    Thanks for the links! 

    I notice that http://www.dittnyabadrum.se/media/108360/linc_diamond.jpg is very large, not the 128x128 you originally mentioned.

    The source image is 5792 x 5792 pixels, which is a 34 megapixel image and will require a LOT of memory to expand to full size and color depth and then resize it. http://web.forret.com/tools/megapixel.asp?width=5792&height=5792 gives details. At least for this image, I don't doubt that you have indeed run out of memory. 

    cheers,
    doug.

     

  • Niklas Hjelm 104 posts 125 karma points
    Apr 07, 2011 @ 10:37
    Niklas Hjelm
    0

    Thanks Doug

    My bad. I can see that the first image is way to big. Thought it was the same as the others. 

    Cheers 

    Niklas

  • Dan Evans 631 posts 1018 karma points
    Apr 22, 2011 @ 03:43
  • Douglas Robar 3570 posts 4711 karma points MVP ∞ admin c-trib
    Apr 25, 2011 @ 10:37
    Douglas Robar
    0

    Hi, Dan,

    Please don't cross-post. I've answered your other post.

    cheers,
    doug.

  • This forum is in read-only mode while we transition to the new forum.

    You can continue this topic on the new forum by tapping the "Continue discussion" link below.

Please Sign in or register to post replies