height - How can we handle out of memory error? -
how can handle out of memory error?
one of our customers contacted , said when uploads images, face error
out of memory
i asked size of images said 4mb, upload 7 mb image successfully.
so tried upload big images until faced error, of them uploaded faced same error when uploading of them
i found error not related in size of image, it's related width , height of image
you can understand better @ link
but don't know max-width
, max-height
are, can validate prevent error.
i forgot say, resize images dynamically.
but can't users resize images because them take large pictures phone maybe of them didn't know how can resize images photoshop.
please help
ideally should restructure code use less memory.
there ways decrease memory overflow jvm process.
- just give jvm more memory -xmx option.
- you should decode insamplesize option reduce memory consumption.
- another option injustdecodebounds can find correct insamplesize value
- also have on article
Comments
Post a Comment