You are viewing a plain text version of this content. The canonical link for it is here.
Posted to server-dev@james.apache.org by Kenny Smith <ja...@journalscape.com> on 2003/08/27 01:32:43 UTC

High CPU Load Followup

Hi all,

Thanks to a pointer from Steve Brewin I was able to get some thread 
dumps while James is running above 90% CPU. I took 4 thread dumps: 3 
within a minute and 1 an hour later. It looks like there are 4 threads 
that are runnable. 3 that are waiting for socket connections (I assume 
that's SMTP, POP, and the Admin Manager), the last 1 is doing DNS for 
remote delivery. Here's the stack:

"Remote delivery thread (1)" prio=1 tid=0x0x8133590 nid=0x2f8d runnable 
[4da1e000..4da1f830]
         at org.xbill.DNS.RRset.first(RRset.java:165)
         at org.xbill.DNS.RRset.getType(RRset.java:126)
         at org.xbill.DNS.Cache.addRRset(Cache.java:247)
         at org.xbill.DNS.Cache.addMessage(Cache.java:609)
         at 
org.apache.james.dnsserver.DNSServer.rawDNSLookup(DNSServer.java:322)
         at org.apache.james.dnsserver.DNSServer.lookup(DNSServer.java:267)
         at 
org.apache.james.dnsserver.DNSServer.findMXRecords(DNSServer.java:211)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
         at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:324)
         at 
org.apache.avalon.phoenix.components.application.BlockInvocationHandler.invoke(BlockInvocationHandler.java:92)
         at $Proxy0.findMXRecords(Unknown Source)
         at org.apache.james.James.getMailServers(James.java:618)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
         at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:324)
         at 
org.apache.avalon.phoenix.components.application.BlockInvocationHandler.invoke(BlockInvocationHandler.java:92)
         at $Proxy9.getMailServers(Unknown Source)
         at 
org.apache.james.transport.mailets.RemoteDelivery.deliver(RemoteDelivery.java:288)
         at 
org.apache.james.transport.mailets.RemoteDelivery.run(RemoteDelivery.java:797)
         at java.lang.Thread.run(Thread.java:536)


There isn't anything in the spool (or at least not in the spool long 
enough for me to catch it in a snap shot. The server is barely receiving 
any email, so its not under load due to too much email.. I'm at my wits 
end, its negatively impacting the rest of my website. I'm starting to 
get Internal Server Errors because Apache can't get the CPU long enough 
to respond to a request.

Any help at all will be really appreciated.

Kenny Smith
JournalScape.com


---------------------------------------------------------------------
To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org


Re: High CPU Load Followup (solved?)

Posted by Kenny Smith <ja...@journalscape.com>.
Hi Noel,

It looks like dnsjava 1.4 recognizes the loop...

$ java -cp dnsjava-1.3.2.jar lookup www.wesfin.com
*waits 1 minute*
^C
$
$ java -cp lib/dnsjava-1.4.0.jar lookup www.wesfin.com
www.wesfin.com: CNAME loop
$

Kenny



On Wednesday, August 27, 2003, at 02:01 PM, Noel J. Bergman wrote:

> Kenny,
>
>> I'm running James 2.2.0a9 with the dnsjava 1.3.2 jar.
>
> Looks likt this may already be fixed:
>
> 	- Fix an infinite loop that could occur when processing a response
> 	  containing a CNAME loop and an rcode of NOERROR.
>
> Please download the new version of dnsjava from www.dnsjava.org.  I'll 
> look
> to update our CVS.
>
> 	--- Noel
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
> For additional commands, e-mail: server-dev-help@james.apache.org
>


---------------------------------------------------------------------
To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org


RE: High CPU Load Followup (solved?)

Posted by "Noel J. Bergman" <no...@devtech.com>.
Kenny,

> I'm running James 2.2.0a9 with the dnsjava 1.3.2 jar.

Looks likt this may already be fixed:

	- Fix an infinite loop that could occur when processing a response
	  containing a CNAME loop and an rcode of NOERROR.

Please download the new version of dnsjava from www.dnsjava.org.  I'll look
to update our CVS.

	--- Noel


---------------------------------------------------------------------
To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org


RE: High CPU Load Followup (solved?)

Posted by "Noel J. Bergman" <no...@devtech.com>.
Kenny,

> I'm running James 2.2.0a9 with the dnsjava 1.3.2 jar. Is that the newer
> version you are referring to?

No, I thought you might still be using 2.1.3.  If that's in 2.2 with 1.3.2,
it is definitely worth looking into the problem.  We should make sure to see
if the loop is in our code or in Brian's.

	--- Noel


---------------------------------------------------------------------
To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org


Re: High CPU Load Followup (solved?)

Posted by Kenny Smith <ja...@journalscape.com>.
Hi Noel,

I'm running James 2.2.0a9 with the dnsjava 1.3.2 jar. Is that the newer 
version you are referring to?

Kenny

> It may already have been fixed.  We're running newer dnsjava code with v2.2,
> and also have made changes in how we use it.


---------------------------------------------------------------------
To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org


RE: High CPU Load Followup (solved?)

Posted by "Noel J. Bergman" <no...@devtech.com>.
Kenny,

It may already have been fixed.  We're running newer dnsjava code with v2.2,
and also have made changes in how we use it.

	--- Noel


---------------------------------------------------------------------
To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org


Re: High CPU Load Followup (solved?)

Posted by Kenny Smith <ja...@journalscape.com>.
Hi Noel,

Good news and bad news.

I turned on debugging and watched the log. I saw it was trying to 
deliver a message from the outgoing spool. I decided I want to clear the 
spool out, regardless of what was in it because I wanted to remove any 
variables. There was only one message in it, so I deleted it.

I restarted James and the CPU utilization spiked in the beginning 
(during start up) and then quickly dropped down below 1% like it should!

I was dumbfounded, so I clicked back in my browser (I have a simple web 
interface to deal with the spools and whatnot) and saw that the message 
that was in the spool had been in the spool for over a month.

That message had to be reason why RemoteDelivery was spinning, but why 
was it causing RemoteDelivery to spin? I have no idea, and the bad news 
is that I already deleted it, so I don't have a copy to look at. I know 
it was going to someone at wesfin.com, but that's about it.

So, I did some "dig"ing and it looks like the MX record for wesfin.com 
points to www.wesfin.com and www.wesfin.com only has a CNAME that points 
at www.wesfin.com. So the org.xbill.DNS code was spinning recursively 
trying to resolve the mail exchanger for wesfin.com.

Thank you for your help, Noel. You are always my savior.

I'm going to try to go find the code in org.xbill.DNS that is doing this 
so I can try to submit a patch.

Kenny Smith
Pastor of the First Church of Noel

Noel J. Bergman wrote:
> Kenny,
> 
> 64% of the time is spent in java.net.PlainSocketImpl.socketAccept()
> 
> 15% of the time is spent in org.xbill.DNS.Cache.addRRset()
> 14% of the time is spent in org.xbill.DNS.Cache.addMessage()
> 10% of the time is spent in org.xbill.DNS.RRset.getTTL()
> 9% of the time is spent in java.util.AbstractList.Iterator
> 6% of the time is spent in org.apache.james.dnsserver.DNSServer.rawDNSLookup
> 
> It sounds as if you are stuck in RemoteDelivery.deliver().  Turn on
> debugging for that mailet:
> 
>   <debug>true</debug>
> 
> If you are stuck in a run() loop, you should immediately see lots of output
> from the log() calls in run() and deliver().
> 
> 	--- Noel
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
> For additional commands, e-mail: server-dev-help@james.apache.org
> 
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org


RE: High CPU Load Followup

Posted by "Noel J. Bergman" <no...@devtech.com>.
Kenny,

If you run this again, please run it with greater stack tracing.  We need
more levels to see whom is the caller at the application level

	--- Noel


---------------------------------------------------------------------
To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org


RE: High CPU Load Followup

Posted by "Noel J. Bergman" <no...@devtech.com>.
Kenny,

64% of the time is spent in java.net.PlainSocketImpl.socketAccept()

15% of the time is spent in org.xbill.DNS.Cache.addRRset()
14% of the time is spent in org.xbill.DNS.Cache.addMessage()
10% of the time is spent in org.xbill.DNS.RRset.getTTL()
9% of the time is spent in java.util.AbstractList.Iterator
6% of the time is spent in org.apache.james.dnsserver.DNSServer.rawDNSLookup

It sounds as if you are stuck in RemoteDelivery.deliver().  Turn on
debugging for that mailet:

  <debug>true</debug>

If you are stuck in a run() loop, you should immediately see lots of output
from the log() calls in run() and deliver().

	--- Noel


---------------------------------------------------------------------
To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org


RE: High CPU Load Followup

Posted by Steve Brewin <sb...@synsys.com>.
Kenny,

> -----Original Message-----
> From: Kenny Smith [mailto:james-list@journalscape.com]
> Sent: 27 August 2003 18:53
> To: James Developers List
> Subject: Re: High CPU Load Followup
>
>
> Hello all,
>
> Still trying to push forward..
>
> HPjmeter doesn't recognize the output format of Java 1.4, so I
> downloaded the PerfAnal from the other link provided (thanks guys).

HPjmeter does recognize JVM 1.4 profile format. I've just tried it with the
sample you attached!

Possibly you didn't click on the Metric menu after opening the file? As I
believe Noel has already indicated, you really need to sample with a greater
call depth to get a useful call graph.

This
http://www.hp.com/products1/unix/java/hpjmeter/specifications/hpjmeter_specs
_1-6.html lists the JVMs supported by HPjmeter and the associated Xrunhprof
keys. It looks pretty good and you certainly can't beat the price!

Glad eveything got sorted in the end.

-- Steve



---------------------------------------------------------------------
To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org


Re: High CPU Load Followup

Posted by Kenny Smith <ja...@journalscape.com>.
Hello all,

Still trying to push forward..

HPjmeter doesn't recognize the output format of Java 1.4, so I 
downloaded the PerfAnal from the other link provided (thanks guys).

I still am very lost about what I'm seeing, but lemme share and see if 
this raises any bells for you guys... (these times are inclusive of 
time spent in methods called within the specified method... does that 
make sense?): 3345 ticks..the numbers in (/) after are the inclusive 
ticks and the exclusive ticks respectively.

64% of the time is spent in java.net.PlainSocketImpl.socketAccept() 
(2138/2138)

15% of the time is spent in org.xbill.DNS.Cache.addRRset() (529/115)
14% of the time is spent in org.xbill.DNS.Cache.addMessage() (453/14)
10% of the time is spent in org.xbill.DNS.RRset.getTTL() (340/22)

9% of the time is spent in java.util.AbstractList.Iterator (311/311)
6% of the time is spent in 
org.apache.james.dnsserver.DNSServer.rawDNSLookup (209/0)

it keeps going. I don't know if this stuff is useful at all. I've 
attached the compressed java.hprof.2.txt file I used. Any help is 
appreciated... my server is running at 4 and 5 load. It is killing me. 
If this keeps up I'm going to need to switch to either a different 
version of James or a different mail server all together (and that would 
hurt, because I love James).

Thanks,
Kenny



Kenny Smith wrote:
> Hi all,
> 
> I think I just got a working profile file... I used "phoenix.sh check" 
> to get a command and run it by hand, then added the -Xrunhprof to that. 
> It seemed to work this time. I have no idea why it would work through 
> the script.
> 
> Kenny
> 
> Kenny Smith wrote:
> 
>> Hi Steve,
>>
>> Thanks again for all the help. I know this is a bit off topic, but 
>> since I'm trying to debug my James problem I hope you guys will give 
>> me some leniency.
>>
>> I'm trying to get a profile dump from james, but either I just don't 
>> understand or the documentation on how to use the java profile is 
>> terrible.
>>
>> http://java.sun.com/j2se/1.4.1/docs/guide/jvmpi/jvmpi.html#hprof
>>
>> I changed phoenix.sh like so:
>>
>>
>> JVM_OPTS="-Djava.ext.dirs=$PHOENIX_HOME/lib 
>> -Xrunhprof:cpu=samples,file=/tmp/profile.txt"
>>
>> #JVM_OPTS="-Djava.ext.dirs=$PHOENIX_HOME/lib"
>>
>> However, when I start up james and let it run for 5 minutes or so and 
>> then stop james, there's barely anything in /tmp/profile.txt. Just a 
>> couple of paragraphs talking about what kind of records are found in a 
>> profile file and then a couple of THREAD START records.
>>
>> I've downloaded HPjmeter, but now I can't figure out how to get the 
>> profile to feed into it. :/
>>
>> Thanks again,
>> Kenny
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
>> For additional commands, e-mail: server-dev-help@james.apache.org
>>
>>
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
> For additional commands, e-mail: server-dev-help@james.apache.org
> 
> 

Re: High CPU Load Followup

Posted by Kenny Smith <ja...@journalscape.com>.
Hi all,

I think I just got a working profile file... I used "phoenix.sh check" 
to get a command and run it by hand, then added the -Xrunhprof to that. 
It seemed to work this time. I have no idea why it would work through 
the script.

Kenny

Kenny Smith wrote:
> Hi Steve,
> 
> Thanks again for all the help. I know this is a bit off topic, but since 
> I'm trying to debug my James problem I hope you guys will give me some 
> leniency.
> 
> I'm trying to get a profile dump from james, but either I just don't 
> understand or the documentation on how to use the java profile is terrible.
> 
> http://java.sun.com/j2se/1.4.1/docs/guide/jvmpi/jvmpi.html#hprof
> 
> I changed phoenix.sh like so:
> 
> 
> JVM_OPTS="-Djava.ext.dirs=$PHOENIX_HOME/lib 
> -Xrunhprof:cpu=samples,file=/tmp/profile.txt"
> 
> #JVM_OPTS="-Djava.ext.dirs=$PHOENIX_HOME/lib"
> 
> However, when I start up james and let it run for 5 minutes or so and 
> then stop james, there's barely anything in /tmp/profile.txt. Just a 
> couple of paragraphs talking about what kind of records are found in a 
> profile file and then a couple of THREAD START records.
> 
> I've downloaded HPjmeter, but now I can't figure out how to get the 
> profile to feed into it. :/
> 
> Thanks again,
> Kenny
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
> For additional commands, e-mail: server-dev-help@james.apache.org
> 
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org


Re: High CPU Load Followup

Posted by Kenny Smith <ja...@journalscape.com>.
Hi Steve,

Thanks again for all the help. I know this is a bit off topic, but since 
I'm trying to debug my James problem I hope you guys will give me some 
leniency.

I'm trying to get a profile dump from james, but either I just don't 
understand or the documentation on how to use the java profile is terrible.

http://java.sun.com/j2se/1.4.1/docs/guide/jvmpi/jvmpi.html#hprof

I changed phoenix.sh like so:


JVM_OPTS="-Djava.ext.dirs=$PHOENIX_HOME/lib 
-Xrunhprof:cpu=samples,file=/tmp/profile.txt"

#JVM_OPTS="-Djava.ext.dirs=$PHOENIX_HOME/lib"

However, when I start up james and let it run for 5 minutes or so and 
then stop james, there's barely anything in /tmp/profile.txt. Just a 
couple of paragraphs talking about what kind of records are found in a 
profile file and then a couple of THREAD START records.

I've downloaded HPjmeter, but now I can't figure out how to get the 
profile to feed into it. :/

Thanks again,
Kenny


---------------------------------------------------------------------
To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org


RE: High CPU Load Followup

Posted by Jason Webb <jw...@inovem.com>.
I've used HP Jmeter to track down a leak in James before.
Its not bad and can give some very useful insight into your code.
I found the Sun one not so nice interface wise and not as rich in the
analysis of the information as the HP.

-- Jason

> -----Original Message-----
> From: Steve Brewin [mailto:sbrewin@synsys.com] 
> Sent: 27 August 2003 12:53
> To: 'James Developers List'; sbrewin@synsys.com
> Subject: RE: High CPU Load Followup
> 
> 
> Kenny,
> 
> Assuming you don't want to splash out on a commercial 
> performance analysis tool, you could also try this...
> 
> http://www.hp.com/products1/unix/java/hpjmeter/infolibrary/jmeter/
> 
> or this...
> 
> http://developer.java.sun.com/developer/technicalArticles/GUI/
> perfanal/
> 
> Both are free. I haven't tried either myself, but they should 
> shed some light on where the CPU time is being spent within 
> the JVM without extensive analysis of thread dumps.
> 
> If you do try one, it would be interesting to know if you 
> found them useful.
> 
> -- Steve
> 
> > -----Original Message-----
> > From: Steve Brewin [mailto:sbrewin@synsys.com]
> > Sent: 27 August 2003 10:29
> > To: 'James Developers List'
> > Subject: RE: High CPU Load Followup
> >
> >
> > Kenny,
> >
> > As described in 
> > http://developer.java.sun.com/developer/technicalArticles/Prog
> > ramming/Stackt
> > race/...
> >
> > "For busy programs: The best course of action you can take for busy 
> > programs is to generate frequent stack traces. This will narrow down
> > the code path
> > that is causing the errors, and you can then start your
> > investigation from
> > there."
> >
> > For "frequent", read 10 at 10 second intervals as a starting point. 
> > You could write a script that generates these "frequent" thread
> > dumps for you.
> > With "frequent" thread dumps you should be able to determine
> > if James is
> > always looking up MX records, as shown in the stacktrace you
> > attached, or
> > typically doing something else.
> >
> > Just to confirm, when you say "James is running above 90% 
> CPU", what 
> > do you mean? Is the process that JVM on which James is running using
> > 90% CPU or is
> > the total CPU usage at 90%? If the latter, what other processes are
> > increasing their CPU consumption?
> >
> > -- Steve
> >
> > > -----Original Message-----
> > > From: Kenny Smith [mailto:james-list@journalscape.com]
> > > Sent: 27 August 2003 00:33
> > > To: James Developers List
> > > Subject: High CPU Load Followup
> > >
> > >
> > > Hi all,
> > >
> > > Thanks to a pointer from Steve Brewin I was able to get 
> some thread 
> > > dumps while James is running above 90% CPU. I took 4 
> thread dumps: 3 
> > > within a minute and 1 an hour later. It looks like there are 4 
> > > threads that are runnable. 3 that are waiting for socket 
> connections
> > > (I assume
> > > that's SMTP, POP, and the Admin Manager), the last 1 is
> > doing DNS for
> > > remote delivery. Here's the stack:
> >
> >
> > 
> ---------------------------------------------------------------------
> > To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
> > For additional commands, e-mail: server-dev-help@james.apache.org
> >
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
> For additional commands, e-mail: server-dev-help@james.apache.org
> 
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org


RE: High CPU Load Followup

Posted by Steve Brewin <sb...@synsys.com>.
Kenny,

Assuming you don't want to splash out on a commercial performance analysis
tool, you could also try this...

http://www.hp.com/products1/unix/java/hpjmeter/infolibrary/jmeter/

or this...

http://developer.java.sun.com/developer/technicalArticles/GUI/perfanal/

Both are free. I haven't tried either myself, but they should shed some
light on where the CPU time is being spent within the JVM without extensive
analysis of thread dumps.

If you do try one, it would be interesting to know if you found them useful.

-- Steve

> -----Original Message-----
> From: Steve Brewin [mailto:sbrewin@synsys.com]
> Sent: 27 August 2003 10:29
> To: 'James Developers List'
> Subject: RE: High CPU Load Followup
>
>
> Kenny,
>
> As described in
> http://developer.java.sun.com/developer/technicalArticles/Prog
> ramming/Stackt
> race/...
>
> "For busy programs: The best course of action you can take
> for busy programs
> is to generate frequent stack traces. This will narrow down
> the code path
> that is causing the errors, and you can then start your
> investigation from
> there."
>
> For "frequent", read 10 at 10 second intervals as a starting
> point. You
> could write a script that generates these "frequent" thread
> dumps for you.
> With "frequent" thread dumps you should be able to determine
> if James is
> always looking up MX records, as shown in the stacktrace you
> attached, or
> typically doing something else.
>
> Just to confirm, when you say "James is running above 90%
> CPU", what do you
> mean? Is the process that JVM on which James is running using
> 90% CPU or is
> the total CPU usage at 90%? If the latter, what other processes are
> increasing their CPU consumption?
>
> -- Steve
>
> > -----Original Message-----
> > From: Kenny Smith [mailto:james-list@journalscape.com]
> > Sent: 27 August 2003 00:33
> > To: James Developers List
> > Subject: High CPU Load Followup
> >
> >
> > Hi all,
> >
> > Thanks to a pointer from Steve Brewin I was able to get some thread
> > dumps while James is running above 90% CPU. I took 4 thread dumps: 3
> > within a minute and 1 an hour later. It looks like there are
> > 4 threads
> > that are runnable. 3 that are waiting for socket connections
> > (I assume
> > that's SMTP, POP, and the Admin Manager), the last 1 is
> doing DNS for
> > remote delivery. Here's the stack:
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
> For additional commands, e-mail: server-dev-help@james.apache.org
>


---------------------------------------------------------------------
To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org


RE: High CPU Load Followup

Posted by Steve Brewin <sb...@synsys.com>.
Kenny,

As described in
http://developer.java.sun.com/developer/technicalArticles/Programming/Stackt
race/...

"For busy programs: The best course of action you can take for busy programs
is to generate frequent stack traces. This will narrow down the code path
that is causing the errors, and you can then start your investigation from
there."

For "frequent", read 10 at 10 second intervals as a starting point. You
could write a script that generates these "frequent" thread dumps for you.
With "frequent" thread dumps you should be able to determine if James is
always looking up MX records, as shown in the stacktrace you attached, or
typically doing something else.

Just to confirm, when you say "James is running above 90% CPU", what do you
mean? Is the process that JVM on which James is running using 90% CPU or is
the total CPU usage at 90%? If the latter, what other processes are
increasing their CPU consumption?

-- Steve

> -----Original Message-----
> From: Kenny Smith [mailto:james-list@journalscape.com]
> Sent: 27 August 2003 00:33
> To: James Developers List
> Subject: High CPU Load Followup
>
>
> Hi all,
>
> Thanks to a pointer from Steve Brewin I was able to get some thread
> dumps while James is running above 90% CPU. I took 4 thread dumps: 3
> within a minute and 1 an hour later. It looks like there are
> 4 threads
> that are runnable. 3 that are waiting for socket connections
> (I assume
> that's SMTP, POP, and the Admin Manager), the last 1 is doing DNS for
> remote delivery. Here's the stack:


---------------------------------------------------------------------
To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org