Re: important help

2002-08-02 Thread Will Hartung

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
([EMAIL PROTECTED])

- Original Message -
From: "Shapira, Yoav" <[EMAIL PROTECTED]>
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:[EMAIL PROTECTED]]
>Sent: Friday, August 02, 2002 1:19 PM
>To: Tomcat Users List
>Cc: [EMAIL PROTECTED]
>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" <[EMAIL PROTECTED]>
>> To: <[EMAIL PROTECTED]>
>> 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.

RE: important help

2002-08-02 Thread Shapira, Yoav

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:[EMAIL PROTECTED]]
>Sent: Friday, August 02, 2002 1:19 PM
>To: Tomcat Users List
>Cc: [EMAIL PROTECTED]
>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" <[EMAIL PROTECTED]>
>> To: <[EMAIL PROTECTED]>
>> 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:[EMAIL PROTECTED]>
>> For additional commands, e-mail:
><mailto:[EMAIL PROTECTED]>
>>
>
>
>--
>To unsubscribe, e-mail:   <mailto:tomcat-user-
>[EMAIL PROTECTED]>
>For additional commands, e-mail: <mailto:tomcat-user-
>[EMAIL PROTECTED]>


--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>




Re: important help

2002-08-02 Thread Anil Garg

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" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> 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:[EMAIL PROTECTED]>
> For additional commands, e-mail:
<mailto:[EMAIL PROTECTED]>
>


--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>




Re: important help

2002-08-02 Thread Michael Locasto

This is more of a problem with the way your application is architected,
rather than Tomcat.

The java.lang.OutOfMemoryError occurs when the JVM cannot allocate any
space for a new object, and the garbage collector cannot collect any
unused heap space.

That's is the low-level reason the StringBuffer is blowing up.

In the file NRConfig, method getMonths(), line 4760, you are doing some
string operation and that is causing the Error to be thrown.

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) 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)

Cheers,
Michael

- Original Message -
From: "Anil Garg" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
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:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>




Re: important help

2002-08-02 Thread Anil Garg

i would like to add more...
i am not able to reproduce the errorhow can i reproduce it..
if i dint provide the sufficinet information u need plz tell me.
regards
anil
- Original Message -
From: "Anil Garg" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
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:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>




important help

2002-08-02 Thread Anil Garg

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



important: help needed with servlets path

2001-10-25 Thread mperreno

(apache 1.3.12 tomcat 3.3)

As seen in the doc, an url path can be sliced in

context path + servlet path + path info

what's not said is that once the context path is matched, the servlet path 
must contain "/servlet/" for the servlet path to be interpreted as a servlet!

Actually I use jserv and I have the following directive

ApJServMount /script /java

and any url matching http://host/script/* is a servlet
I *have to* do the same thing with mod_jk

I have ~160 virtual hosts and 6500 servlets, so I can't name them all in a 
web.xml file

This could be done with Tomcat3.2 in which one could change the /servlet/ 
prefix with anything (prefix="/" for me) in the 

help 

-- 
mathieu perrenoud [iis]