How do you verify that the heap space provided was understood correctly by the JVM ? Check this setting and double check it.
2 GB is enough memory to host a couple of middle sized applications. Perhaps there is a memory leak or your are holding on to your references for more time than you need to. Use a
java profiler and determine where all the memory is leaking