You have a memory leak. (Yes, I like stating the obvious!) Google "java memory leak detection tools" for some hints on how to debug this.
May be you are right, but these tools can use to where out memory going, but how can i remove that error which i am geting again and again. every time i have to close the server and start it again.
Should i have to increase my Ram Size?
IS there s any other method to solve this?
you have to get the information where the leak is located and then fix it. If it is in an external software component that you cannot fix the provider has to fix it. Getting more RAM is not the solution, because it will just last longer until you get the error.
If you have incredible pain you don't just eat more pills, but you look for the cause and fix it.
I face the same problem at work and I use this tool:
It gives you a good overview of the heap of your server.
You can also use the jconsole in the JDK to get an overview of the parts of the heap.
You also have to consider some issues, if you use individual portlets liferay:
1. If you use Spring and AnnotationConfigApplicationContext, then you must close the AnnotationConfigApplicationContext.
2. I make the experience, that SLSB are not destroyed. You must mark a methode with @PreDestroy and the call this method to remove the EJB.
3. If you use the EntityManager and Hibernate then clear it sometimes.
But that are only suggestions.