tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From wi...@msoft.com (Will Hartung)
Subject Re: important help
Date Fri, 02 Aug 2002 18:02:01 GMT
Either way, you want to take a HARD look at what you're doing where this
code explodes. Make sure it's doing what you want to do. This isn't either a
Tomcat or even a JVM problem. It's a big alert that something is basically
wrong here.

If this is easily reproducible with a single request, then you have some
serious architecture issues, I would think.

Thinking about heap size, overhead, code size, etc, and with a 64MB heap,
you still have a LOT of room left over, particularly for what 99% of people
do with servlets.

Now, perhaps your particular application is really different from everyone
else, but if this is a problem easily reporduced by a single transaction
(versus an issue related to system load), then playing with the heap is
probably not going to help you.

BTW, does it bother anyone else that this NROptions class is pushing 5000
lines long? I'm certainly not innocent of such horrors, as we have a couple
as well (badly factored Utility classes, mostly), but that alone, to me, is
red flag as well.

Finally, it looks to me that this user is sucking in an enormous table from
some data source.

Good Luck!

Regards,

Will Hartung
(willh@msoft.com)

----- Original Message -----
From: "Shapira, Yoav" <Yoav.Shapira@mpi.com>
Sent: Friday, August 02, 2002 10:30 AM


Hi,
Try java -X to see all the java pseudo-unsupported options ;)

The default heap is 64M.  You want to add -XmxNm where N is the maximum
number of megabytes you need, e.g. -Xmx512m for 512MB.

For tomcat, you will want to add this as a JAVA_OPTS setting.  See the
%CATALINA_HOME/bin/catalina.sh file.

Yoav Shapira
Millennium ChemInformatics


>-----Original Message-----
>From: Anil Garg [mailto:anilg@niksun.com]
>Sent: Friday, August 02, 2002 1:19 PM
>To: Tomcat Users List
>Cc: locasto@cs.columbia.edu
>Subject: Re: important help
>
>thanx for ur mail..
>could u plz tell me:
>
>
>> If you are unable to re-architect your application to consume less
memory
>> or free memory up, you can try upgrading to JDK 1.4.x (which has a
better
>> garbage collector)
>How to check which version of jdk is on my machine.(i hope you wont
mind
>questions too trivial for u)
>>or check out the options to increase heap and thread
>> stack size in the JVM ( run 'java -X' from the command line for the
>> options)
>
>How can i check the current heap size set and how can i chage it *on
unix
>machine*
>
>thanx
>anil
>>
>> Cheers,
>> Michael
>>
>> ----- Original Message -----
>> From: "Anil Garg" <anilg@niksun.com>
>> To: <tomcat-user@jakarta.apache.org>
>> Sent: Friday, August 02, 2002 12:26 PM
>> Subject: important help
>>
>>
>> please see the following error..and tell me on what lines should i
start
>> thinking. This error is coming on a particular users machine ..and
doesnt
>> come at other locations:
>>
>>
>> Error: 500
>>
>>    Location: /servlet/NROptions
>>
>>    Internal Servlet Error:
>>
>>    java.lang.OutOfMemoryError:
>>
>>               at
>> java.lang.StringBuffer.expandCapacity(StringBuffer.java)
>>
>>               at java.lang.StringBuffer.append(StringBuffer.java)
>>
>>               at NRConfig.getMonths(NRConfig.java:4760)
>>
>>               at NRConfig.printChartTimes(NRConfig.java:3732)
>>
>>               at NRConfig.getDLTinfo(NRConfig.java:347)
>>
>>               at NROptions.ListOptions(NROptions.java:426)
>>
>>               at NROptions.doGet(NROptions.java:29)
>>
>>               at
>> javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
>>
>>               at
>> javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
>>
>>               at
>>
org.apache.tomcat.core.ServletWrapper.doService(ServletWrapper.java:405)
>>
>>               at
>> org.apache.tomcat.core.Handler.service(Handler.java:287)
>>
>>               at
>>
org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java:372)
>>
>>               at
>>
org.apache.tomcat.core.ContextManager.internalService(ContextManager.jav
>> a:812)
>>               at
>>
org.apache.tomcat.core.ContextManager.service(ContextManager.java:758)
>>
>>               at
>>
org.apache.tomcat.service.connector.Ajp13ConnectionHandler.processConnec
>> tion(Ajp13ConnectionHandler.java:160)
>>               at
>>
org.apache.tomcat.service.TcpWorkerThread.runIt(PoolTcpEndpoint.java:416
>> )
>>               at
>>
org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPool.java:50
>> 1)
>>               at java.lang.Thread.run(Thread.java)
>>
>>
>>
>>
>>
>>
>> This is really important to me..
>> i hope to get some mails which will let me analyse the problem well.
>> regards
>> anil
>> PS:i am newbie to java and tomcat
>>
>>
>>
>>
>> --
>> To unsubscribe, e-mail:
><mailto:tomcat-user-unsubscribe@jakarta.apache.org>
>> For additional commands, e-mail:
><mailto:tomcat-user-help@jakarta.apache.org>
>>
>
>
>--
>To unsubscribe, e-mail:   <mailto:tomcat-user-
>unsubscribe@jakarta.apache.org>
>For additional commands, e-mail: <mailto:tomcat-user-
>help@jakarta.apache.org>


--
To unsubscribe, e-mail:
<mailto:tomcat-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail:
<mailto:tomcat-user-help@jakarta.apache.org>





--
To unsubscribe, e-mail:   <mailto:tomcat-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:tomcat-user-help@jakarta.apache.org>


Mime
View raw message