Thanks for your reply. Same thing i did, its working fine but I need to know axactly why it is coming. We are moving the project to production. At last munite i am facing this problem. I don't want to repeat this once again in production.
when i try to submit the data to the servlet,I'm getting OutOfMemoryError at Stringbuffer. The following is the exact message:
java.lang.OutOfMemoryError at java.lang.StringBuffer.append(Compiled Code) at forecast.common.QuotesPageFormatter.formatTable(Compiled Code) at forecast.servlets.SFAGetQuotesServlet.process(Compiled Code) at forecast.servlets.SFAGetQuotesServlet.doPost(Compiled Code) at javax.servlet.http.HttpServlet.service(Compiled Code) at javax.servlet.http.HttpServlet.service(Compiled Code) at com.sun.server.ServletState.callService(Compiled Code) at com.sun.server.ServletManager.callServletService(Compiled Code) at com.sun.server.http.servlet.InvokerServlet.service(Compiled Code) at javax.servlet.http.HttpServlet.service(Compiled Code) at com.sun.server.ServletState.callService(Compiled Code) at com.sun.server.ServletManager.callServletService(Compiled Code) at com.sun.server.ProcessingState.invokeTargetServlet(Compiled Code) at com.sun.server.http.HttpProcessingState.execute(Compiled Code) at com.sun.server.http.stages.Runner.process(Compiled Code) at com.sun.server.ProcessingSupport.process(Compiled Code) at com.sun.server.Service.process(Compiled Code) at com.sun.server.http.HttpServiceHandler.handleRequest(Compiled Code) at com.sun.server.http.HttpServiceHandler.handleRequest(Compiled Code) at com.sun.server.HandlerThread.run(Compiled Code)
I have already experienced the same error message, it generally happens when too many session are open with much data in the sessions context of the users (login objects, data objects ...)
As CatWeasel said you can increase the amount of memory available for the servlet container.
You can also try to reduce the 'invalidation time' for the sessions (time after wich a session expires, and also all objects contained inside). by default I have 30 minutes
Could you please alaborate your message "run the program with the -Xmsn option". Whether i have to compile my servlet with -Xmsn or how i have to run. The above error message is related to a servlet. when i an running my application, now and then i am getting outofmemoryerror exception. so could you please send in detail.
I'm using weblogic locally to test my servlets before i deploy them. Weblogic (fortunately) is also a Java-application which i execute with the -Xmsn option to increase the initial memory usage (This also includes the memory usage for the servlets).
The only sugestion that i can give you is to check the documentation if it's capable of increasing the initial memory usage.
Hope this helps,
Steven.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.