Tomcat java processes eat processor.
- From: "Leon Rosenberg" <rosenberg.leon (at) googlemail.com>
- Date: Wed, 21 Jun 2006 20:13:29 +0200
I really should have added instructions :-)
but ok, here they are
goto
http://moskito.anotheria.net/download/nightly/
and download the nightly (actually daily) build
http://moskito.anotheria.net/download/nightly/moskito-dist.2006-06-21.tar.gz
you can check the contents of the demowebapp (moskitodemo.war) on how
to integrate but actually you need to perform few steps:
unjar moskito-webui-jsps.jar into webapps/YOURWEBAPP
unjar moskito-webui-config.jar into webapps/YOURWEBAPP/WEB-INF/classes
add moskito-core.jar, moskito-webui.jar and moskito-web.jar into
webapps/YOURWEBAPP/WEB-INF/lib
copy all libs from moskito-dist/lib into webapps/YOURWEBAPP/WEB-INF/lib
add following to the web.xml:
<filter>
<filter-name>RequestURIFilter</filter-name>
<filter-class>net.java.dev.moskito.web.filters.RequestURIFilter</filter-class>
<init-param>
<param-name>limit</param-name>
<param-value>100</param-value>
</init-param>
</filter>
<filter-mapping>
<filter-name>RequestURIFilter</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
this way the filter will monitor each request to the root webapp.
change the url-pattern to your webapp name. The limit parameter to the
filter-class definition should correspond with the your apps uris. The
background is that moskito adds uris dynamically, as the requests
come, so if you don't limit it, some bad guys could fire nonsense
request at your webapp and force an OutOfMemory. Therefore set it to
1000 or something.
with the above steps you are fine, and the filter should monitor by
now. However, for moskito-user-interface you need two more steps,
since it requires struts
1. add the moskitoui servlet to your webxml:
<servlet>
<servlet-name>moskitoUI</servlet-name>
<servlet-class>net.java.dev.moskito.webui.MoskitoUIServlet</servlet-class>
<init-param>
<param-name>application</param-name>
<param-value>ApplicationResources</param-value>
</init-param>
<init-param>
<param-name>config</param-name>
<param-value>
/WEB-INF/classes/struts-config-moskito.xml,
</param-value>
</init-param>
<load-on-startup>1</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>moskitoUI</servlet-name>
<url-pattern>/mui/*</url-pattern>
</servlet-mapping>
2. add struts tlds to your webapp, for example
webapps/YOURWEBAPP/WEB-INF/tld
and then to your web.xml: (note if you are using web.xml version 2.4
you have to surround taglib tags with jsp-config tag.
<taglib>
<taglib-uri>/tags/struts-html</taglib-uri>
<taglib-location>/WEB-INF/tld/struts-html.tld</taglib-location>
</taglib>
<taglib>
<taglib-uri>/tags/struts-bean</taglib-uri>
<taglib-location>/WEB-INF/tld/struts-bean.tld</taglib-location>
</taglib>
<taglib>
<taglib-uri>/tags/struts-logic</taglib-uri>
<taglib-location>/WEB-INF/tld/struts-logic.tld</taglib-location>
</taglib>
that all
feel free to contact me off list if you are stuck somewhere
leon
On 6/21/06, Rick Cockerham <rick (at) pocketknifesoftware.com> wrote:
This looks perfect. It's what I need. However...
I've been all over the website below. I don't see how to install this
through web.xml. I see how to extend a servlet. I'm using JSP. So,
that's a little more difficult.
Thanks,
Rick
Leon Rosenberg wrote:
> look at this:
>
> http://moskito.anotheria.net/moskitodemo/mui/mskShowAllProducers
>
> RequestURIFilter is probably what you want
>
> you can install this monitoring application by simply adding a filter
> entry to your web.xml. This way you'll see which requests are
> currently executed and which uris lasting how long. It might give you
> a hint what's hanging.
>
> Leon
>
> On 6/20/06, Rick Cockerham <rick (at) pocketknifesoftware.com> wrote:
>>
>> Not sure what you mean. I can recompile and deploy the code with no
>> problems. So, probably...
>>
>>
>>
>> Leon Rosenberg wrote:
>> > On 6/19/06, Rick Cockerham <rick (at) pocketknifesoftware.com> wrote:
>> >>
>> >> I wish it would give me a stack trace. That would be wonderful. The
>> >> part I left out was just a list of all the loaded libraries.
>> >>
>> >> I can't risk a switch in software. I realize this is a tough one. I
>> >> have very little flexibility to help me debug. That's why I'm asking
>> >> you guys!
>> >
>> > Are you allowed to add a new filter?
>> > If yes I have a solution for you :-)
>> >
>> >>
>> >> Thanks,
>> >> Rick
>> >>
>> >>
>> >>
>> >> Leon Rosenberg wrote:
>> >> > On 6/19/06, Rick Cockerham <rick (at) pocketknifesoftware.com> wrote:
>> >> >>
>> >> >> OK. I finally got a file dumped out from this kill. But, it
>> doesn't
>> >> >> look interesting to me. Any idea what this means to me?
>> >> >>
>> >> >> Any other debug ideas?
>> >> >
>> >> > a) paste complete stack trace
>> >> > b) try a regular vm (suns for example)
>> >> >
>> >> > regards
>> >> > Leon
>> >> >>
>> >> >> Thanks,
>> >> >> Rick
>> >> >>
>> >> >> Unexpected Signal : 3 occurred at PC=0x45C6D876
>> >> >> Function=(null)+0x45C6D876
>> >> >> Library=/opt/blackdown-jdk-1.4.2.01/jre/lib/i386/server/libjvm.so
>> >> >>
>> >> >> NOTE: We are unable to locate the function name symbol for the
>> error
>> >> >> just occurred. Please refer to release documentation for
>> >> possible
>> >> >> reason and solutions.
>> >> >>
>> >> >> Dynamic libraries:
>> >> >> 08048000-08057000 r-xp 00000000 08:03 815431
>> >> >> /opt/blackdown-jdk-1.4.2.01/bin/java
>> >> >> ...................
>> >> >> ...................etc.
>> >> >>
>> >> >> Heap at VM Abort:
>> >> >> Heap
>> >> >> PSYoungGen total 102400K, used 84863K [0x4a170000,
>> 0x53770000,
>> >> >> 0x53770000)
>> >> >> eden [0x4a170000,0x4d1702f8,0x4d370000)
>> >> >> from [0x4d370000,0x4f64fc38,0x50570000)
>> >> >> to [0x50570000,0x50570000,0x53770000)
>> >> >> PSOldGen total 256000K, used 215274K [0x53770000,
>> 0x63170000,
>> >> >> 0x63170000)
>> >> >> object [0x53770000,0x609aa8c0,0x63170000)
>> >> >> PSPermGen total 16384K, used 16250K [0x63170000,
>> 0x64170000,
>> >> >> 0x67170000)
>> >> >> object [0x63170000,0x6414e9f0,0x64170000)
>> >> >>
>> >> >> Local Time = Mon Jun 19 09:27:56 2006
>> >> >>
>> >> >>
>> >> >> Peter Crowther wrote:
>> >> >> >> From: Rick Cockerham [mailto:rick (at) pocketknifesoftware.com]
>> >> >> >> Didn't work. -3 doesn't kill it.
>> >> >> >>
>> >> >> >
>> >> >> > No. It produces a thread dump, and the process carries on
>> going.
>> >> >> Given
>> >> >> > that you were complaining about not wanting to restart Tomcat
>> twice
>> >> >> > daily, I thought you'd appreciate a non-fatal solution :-).
>> >> >> >
>> >> >> > - Peter
>> >> >> >
>> >> >> >
>> >> ---------------------------------------------------------------------
>> >> >> > To start a new topic, e-mail: users (at) tomcat.apache.org
>> >> >> > To unsubscribe, e-mail: users-unsubscribe (at) tomcat.apache.org
>> >> >> > For additional commands, e-mail: users-help (at) tomcat.apache.org
>> >> >> >
>> >> >> >
>> >> >>
>> >> >> --
>> >> >>
>> >> >> Rick Cockerham
>> >> >> Pocket Knife Software, Inc.
>> >> >> http://www.pocketknifesoftware.com
>> >> >> 512-249-0467
>> >> >>
>> >> >>
>> >> >>
>> ---------------------------------------------------------------------
>> >> >> To start a new topic, e-mail: users (at) tomcat.apache.org
>> >> >> To unsubscribe, e-mail: users-unsubscribe (at) tomcat.apache.org
>> >> >> For additional commands, e-mail: users-help (at) tomcat.apache.org
>> >> >>
>> >> >>
>> >> >
>> >> >
>> ---------------------------------------------------------------------
>> >> > To start a new topic, e-mail: users (at) tomcat.apache.org
>> >> > To unsubscribe, e-mail: users-unsubscribe (at) tomcat.apache.org
>> >> > For additional commands, e-mail: users-help (at) tomcat.apache.org
>> >> >
>> >>
>> >> --
>> >>
>> >> Rick Cockerham
>> >> Pocket Knife Software, Inc.
>> >> http://www.pocketknifesoftware.com
>> >> 512-249-0467
>> >>
>> >>
>> >> ---------------------------------------------------------------------
>> >> To start a new topic, e-mail: users (at) tomcat.apache.org
>> >> To unsubscribe, e-mail: users-unsubscribe (at) tomcat.apache.org
>> >> For additional commands, e-mail: users-help (at) tomcat.apache.org
>> >>
>> >>
>> >
>> > ---------------------------------------------------------------------
>> > To start a new topic, e-mail: users (at) tomcat.apache.org
>> > To unsubscribe, e-mail: users-unsubscribe (at) tomcat.apache.org
>> > For additional commands, e-mail: users-help (at) tomcat.apache.org
>> >
>>
>> --
>>
>> Rick Cockerham
>> Pocket Knife Software, Inc.
>> http://www.pocketknifesoftware.com
>> 512-249-0467
>>
>>
>> ---------------------------------------------------------------------
>> To start a new topic, e-mail: users (at) tomcat.apache.org
>> To unsubscribe, e-mail: users-unsubscribe (at) tomcat.apache.org
>> For additional commands, e-mail: users-help (at) tomcat.apache.org
>>
>>
>
> ---------------------------------------------------------------------
> To start a new topic, e-mail: users (at) tomcat.apache.org
> To unsubscribe, e-mail: users-unsubscribe (at) tomcat.apache.org
> For additional commands, e-mail: users-help (at) tomcat.apache.org
>
--
Rick Cockerham
Pocket Knife Software, Inc.
http://www.pocketknifesoftware.com
512-249-0467
---------------------------------------------------------------------
To start a new topic, e-mail: users (at) tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe (at) tomcat.apache.org
For additional commands, e-mail: users-help (at) tomcat.apache.org
---------------------------------------------------------------------
To start a new topic, e-mail: users (at) tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe (at) tomcat.apache.org
For additional commands, e-mail: users-help (at) tomcat.apache.org