tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From <ext-narsi.re...@nokia.com>
Subject RE: How to increase the tomcat heap memory
Date Tue, 30 Dec 2008 11:13:42 GMT



HI Mark Thomas 

Thanks for replying to my query , 

>What did you try?

I tried CATALINA_OPTS -Xms 1024m and -Xmx 1024m  in environment
variables  and tried with JAVA_OPTS also , and I changed in the programs
--> Apache Tomcat 6.0 --> Configure Tomcat  also here I tried in java
options and min and max pool also 

>Operating system?

My operating system is Windows XP proffesional version 2002  service
pack 2,

>Just set CATALINA_OPTS=-Xmx1024m (or whatever you want to set) 
>in setenv.bat/setenv.sh as appropriate for your OS.


Here I don't have any file called  setenv.bat/setenv.sh  in my tomcat
6.0.18 folders , so where can I find it ?? 


Thanks and Regards 

Narsi Reddy CH 


 

>-----Original Message-----
>From: ext Mark Thomas [mailto:markt@apache.org] 
>Sent: Tuesday, December 30, 2008 4:24 PM
>To: Tomcat Users List
>Subject: Re: How to increase the tomcat heap memory
>
>ext-narsi.reddy@nokia.com wrote:
>>               Basically  im running  jmeter  with 30 threads with 3 
>> requests with tomcat 6.0.18 , but tomcat is giving the Out of memory 
>> error ,
>That sounds like you have a memory leak in your application.
>
>>  I want to increase Heap memory of tomcat , I tried  somany 
>ways  but 
>> it did not worked for me , it is  almost  1 week  for me ,
>What did you try?
>
>> can somebody  pls help me how to increase the heap memory of tomcat
>> 6.0.18
>
>Operating system?
>
>Just set CATALINA_OPTS=-Xmx1024m (or whatever you want to set) 
>in setenv.bat/setenv.sh as appropriate for your OS.
>
>and how can I check whether the memory is incresed or not ???
>Many ways. JConsole is one.
>
>Mark
>
>> 
>> 
>> Here is sever error  code ,
>> 
>> Dec 30, 2008 3:54:18 PM org.apache.catalina.core.StandardWrapperValve
>> invoke
>> SEVERE: Servlet.service() for servlet WebAPI threw exception
>> java.lang.OutOfMemoryError: Java heap space
>> 	at java.util.Arrays.copyOf(Arrays.java:2882)
>> 	at
>> 
>java.lang.AbstractStringBuilder.expandCapacity(AbstractStringBuilder.j
>> av
>> a:100)
>> 	at
>> 
>java.lang.AbstractStringBuilder.append(AbstractStringBuilder.java:390)
>> 	at java.lang.StringBuilder.append(StringBuilder.java:119)
>> 	at
>> 
>com.nokia.buddyradar.parser.LocationXMLCreator.xmlToByteArray(Location
>> XM
>> LCreator.java:189)
>> 	at
>> 
>com.nokia.buddyradar.webapi.WebApiServlet.convertXml(WebApiServ
>let.java:
>> 154)
>> 	at
>> 
>com.nokia.buddyradar.webapi.WebApiServlet.doGet(WebApiServlet.java:109)
>> 	at javax.servlet.http.HttpServlet.service(HttpServlet.java:617)
>> 	at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
>> 	at
>> 
>org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appli
>> ca
>> tionFilterChain.java:290)
>> 	at
>> 
>org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFi
>> lt
>> erChain.java:206)
>> 	at
>> 
>org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperVa
>> lv
>> e.java:233)
>> 	at
>> 
>org.apache.catalina.core.StandardContextValve.invoke(StandardContextVa
>> lv
>> e.java:191)
>> 	at
>> 
>org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.ja
>> va
>> :128)
>> 	at
>> 
>org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.ja
>> va
>> :102)
>> 	at
>> 
>org.apache.catalina.core.StandardEngineValve.invoke(StandardEng
>ineValve.
>> java:109)
>> 	at
>> 
>org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java
>> :2
>> 86)
>> 	at
>> 
>org.apache.coyote.http11.Http11AprProcessor.process(Http11AprProcessor
>> .j
>> ava:857)
>> 	at
>> 
>org.apache.coyote.http11.Http11AprProtocol$Http11ConnectionHandler.pro
>> ce
>> ss(Http11AprProtocol.java:565)
>> 	at
>> 
>org.apache.tomcat.util.net.AprEndpoint$Worker.run(AprEndpoint.j
>ava:1509)
>> 	at java.lang.Thread.run(Thread.java:619)
>> Dec 30, 2008 3:54:18 PM org.apache.catalina.core.StandardWrapperValve
>> invoke
>> SEVERE: Servlet.service() for servlet WebAPI threw exception
>> java.lang.OutOfMemoryError: Java heap space
>> 	at java.util.Arrays.copyOf(Arrays.java:2786)
>> 	at
>> java.io.ByteArrayOutputStream.write(ByteArrayOutputStream.java:94)
>> 	at sun.nio.cs.StreamEncoder.writeBytes(StreamEncoder.java:202)
>> 	at sun.nio.cs.StreamEncoder.implWrite(StreamEncoder.java:263)
>> 	at sun.nio.cs.StreamEncoder.write(StreamEncoder.java:106)
>> 	at java.io.OutputStreamWriter.write(OutputStreamWriter.java:190)
>> 	at java.io.BufferedWriter.flushBuffer(BufferedWriter.java:111)
>> 	at java.io.BufferedWriter.write(BufferedWriter.java:212)
>> 	at java.io.Writer.write(Writer.java:140)
>> 	at
>> 
>org.dom4j.io.XMLWriter.writeEscapeAttributeEntities(XMLWriter.j
>ava:1720)
>> 	at org.dom4j.io.XMLWriter.writeAttributes(XMLWriter.java:1489)
>> 	at org.dom4j.io.XMLWriter.writeElement(XMLWriter.java:937)
>> 	at org.dom4j.io.XMLWriter.writeNode(XMLWriter.java:1301)
>> 	at
>> org.dom4j.io.XMLWriter.writeElementContent(XMLWriter.java:1086)
>> 	at org.dom4j.io.XMLWriter.writeElement(XMLWriter.java:954)
>> 	at org.dom4j.io.XMLWriter.writeNode(XMLWriter.java:1301)
>> 	at org.dom4j.io.XMLWriter.write(XMLWriter.java:344)
>> 	at
>> 
>com.nokia.buddyradar.parser.LocationXMLCreator.xmlToByteArray(Location
>> XM
>> LCreator.java:186)
>> 	at
>> 
>com.nokia.buddyradar.webapi.WebApiServlet.convertXml(WebApiServ
>let.java:
>> 154)
>> 	at
>> 
>com.nokia.buddyradar.webapi.WebApiServlet.doGet(WebApiServlet.java:109)
>> 	at javax.servlet.http.HttpServlet.service(HttpServlet.java:617)
>> 	at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
>> 	at
>> 
>org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appli
>> ca
>> tionFilterChain.java:290)
>> 	at
>> 
>org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFi
>> lt
>> erChain.java:206)
>> 	at
>> 
>org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperVa
>> lv
>> e.java:233)
>> 	at
>> 
>org.apache.catalina.core.StandardContextValve.invoke(StandardContextVa
>> lv
>> e.java:191)
>> 	at
>> 
>org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.ja
>> va
>> :128)
>> 	at
>> 
>org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.ja
>> va
>> :102)
>> 	at
>> 
>org.apache.catalina.core.StandardEngineValve.invoke(StandardEng
>ineValve.
>> java:109)
>> 	at
>> 
>org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java
>> :2
>> 86)
>> 	at
>> 
>org.apache.coyote.http11.Http11AprProcessor.process(Http11AprProcessor
>> .j
>> ava:857)
>> 	at
>> 
>org.apache.coyote.http11.Http11AprProtocol$Http11ConnectionHandler.pro
>> ce
>> ss(Http11AprProtocol.java:565)
>>  im in users block of readxml
>> datasource connection
>> jdbc:mysql://localhost:3306/extravert?autoReconnect=true,
>> UserName=root@localhost, MySQL-AB JDBC Driver datasource connection 
>> jdbc:mysql://localhost:3306/extravert?autoReconnect=true,
>> UserName=root@localhost, MySQL-AB JDBC Driver  inserted in 
>to location 
>> tablejdbc:mysql://localhost:3306/extravert?autoReconnect=true,
>> UserName=root@localhost, MySQL-AB JDBC Driver datasource connection 
>> jdbc:mysql://localhost:3306/extravert?autoReconnect=true,
>> UserName=root@localhost, MySQL-AB JDBC Driver
>> 
>> 
>> 
>> Thanks and Regards
>> 
>> Narsi Reddy CH
>> 
>
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
>For additional commands, e-mail: users-help@tomcat.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Mime
View raw message