If you have increased the size of heap size and got no result , then there may be some problem with your code.In normal conditions it's enough to set the max size of the heap to 1GB.Have you used hibernate in your application?