Problem using YourKit to profile an app that uses Axis

Questions about YourKit Java Profiler
Post Reply
mraible
Posts: 4
Joined: Mon Apr 04, 2005 8:50 pm

Problem using YourKit to profile an app that uses Axis

Post by mraible »

We have a fairly simple application that talks to a web services backend (using Axis). When I "start recording object allocations", the call to web services fails on the backend and we cannot use our app (or profile it). When I stop (using "discard"), everything runs fine. Here's the exception:

Code: Select all

Apr 4, 2005 2:49:40 PM org.apache.axis.Message writeTo
SEVERE: java.io.IOException:
java.net.SocketException: Software caused connection abort: socket write error
        at java.net.SocketOutputStream.socketWrite0(Native Method)
        at java.net.SocketOutputStream.socketWrite(Unknown Source)
        at java.net.SocketOutputStream.write(Unknown Source)
        at java.io.BufferedOutputStream.write(Unknown Source)
        at sun.nio.cs.StreamEncoder$CharsetSE.writeBytes(Unknown Source)
        at sun.nio.cs.StreamEncoder$CharsetSE.implWrite(Unknown Source)
        at sun.nio.cs.StreamEncoder.write(Unknown Source)
        at java.io.OutputStreamWriter.write(Unknown Source)
        at java.io.BufferedWriter.flushBuffer(Unknown Source)
        at java.io.BufferedWriter.write(Unknown Source)
        at java.io.Writer.write(Unknown Source)
        at org.apache.axis.SOAPPart.writeTo(SOAPPart.java:277)
        at org.apache.axis.Message.writeTo(Message.java:440)
        at org.apache.axis.transport.http.HTTPSender.writeToSocket(HTTPSender.ja
va:466)
        at org.apache.axis.transport.http.HTTPSender.invoke(HTTPSender.java:122)

        at org.apache.axis.strategies.InvocationStrategy.visit(InvocationStrateg
y.java:71)
        at org.apache.axis.SimpleChain.doVisiting(SimpleChain.java:150)
        at org.apache.axis.SimpleChain.invoke(SimpleChain.java:120)
        at org.apache.axis.client.AxisClient.invoke(AxisClient.java:180)
        at org.apache.axis.client.Call.invokeEngine(Call.java:2564)
        at org.apache.axis.client.Call.invoke(Call.java:2553)
        at org.apache.axis.client.Call.invoke(Call.java:2248)
        at org.apache.axis.client.Call.invoke(Call.java:2171)
        at org.apache.axis.client.Call.invoke(Call.java:1691)
Is there anyway to exclude org.axis from being included in the profile? We have a memory issue and we're trying to identify where it's happening at.

Thanks,

Matt
Vladimir Kondratyev
Posts: 1624
Joined: Tue Aug 10, 2004 7:52 pm

Post by Vladimir Kondratyev »

At the first glance this exception does not have any connection with profiling. Does it happen only when you enable recording of object allocations?
mraible
Posts: 4
Joined: Mon Apr 04, 2005 8:50 pm

Post by mraible »

Yes, it only happens when I enable recording of object allocations. If I turn that off, it works fine. Also, I've found that using OptimizeIt works fine and doesn't cause this problem.
Vladimir Kondratyev
Posts: 1624
Joined: Tue Aug 10, 2004 7:52 pm

Post by Vladimir Kondratyev »

OK. Couldn't you please send us a small sample which demonstrates the problem. I do know that profiler doesn't prevent any process to write to socket.

Thank you in advance,
Vladimir Kondratyev
mraible
Posts: 4
Joined: Mon Apr 04, 2005 8:50 pm

Post by mraible »

I can't really whip up an application to demonstrate this, but we did figure out the problem with OptimizeIt. It turned out to be that the web services loading a large amount of object was causing a bunch of Axis objects to hang around. We changed to loading our objects with EJBs and it fixed the problem.

Thanks,

Matt
Post Reply