I'm having problem while trying to create a BufferedImage. I have this problem just on the server I rented, not on my development environment (my computer).
I have a form to upload image. After the image is uploaded I save it to the file system.
I save it immediately because, according to what some of you said, I can "release" resources from the server memory, since I use the image on my file system and not the object Part
to make the image resizes, controls, etc. I need.
As soon as I try to create a BufferedImage, from an image bigger than 2-3 mb, I get that error.
While executing this line my Application stop working and I get that error
BufferedImage immagineTemporaneaBufferizzata = ImageIO.read(new File...);
I used a method found on the internet to check the memory on the server. This is what I get before encountering the error:
Used Memory:26 Free Memory:30 Total Memory:57 Max Memory:57
Should I increase the heap memory? I tried to do it both on catalina.bat and catalina.sh but I didn't see changes in my Max Memory
. Probably I did something wrong. What's the right way to increase heap size on linux?