hc-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Supun Kamburugamuva <supu...@gmail.com>
Subject Re: Waiting on SharedOutputBuffer.flushContent method
Date Fri, 04 Jun 2010 23:30:58 GMT
I think I've understood how write method and flushContent methods work
together.

Thanks,
Supun..

On Fri, Jun 4, 2010 at 5:50 PM, Supun Kamburugamuva <supun06@gmail.com>wrote:

> In one of our deployments Synapse becomes really slow. Here is a thread
> dump of the blocking threads. Here I can see that the thread is waiting
> on SharedOutputBuffer.flushContent method.
>
> First it checks weather SharedOutputBuffer has data in the write method
> of SharedOutputBuffer. If the buffer doesn't have data it calls
> the flushContent method. But in the flushContent method it again check
> weather buffer has data in the hasData method. If it has data it wait. But
> since it has already checked weather data is available in the write method
> flushContent hasData should return false.
>
> Does this mean after we have seen buffer doesn't have data somebody has
> produced data?
>
> Thanks,
> Supun..
>
> "HttpClientWorker-8" prio=10 tid=0x08710c00 nid=0x5c04 in Object.wait()
> [0x5ed25000]
>    java.lang.Thread.State: WAITING (on object monitor)
> at java.lang.Object.wait(Native Method)
> at java.lang.Object.wait(Object.java:485)
>  at
> org.apache.http.nio.util.SharedOutputBuffer.flushContent(SharedOutputBuffer.java:191)
> - locked <0xf17c13e0> (a java.lang.Object)
>  at
> org.apache.http.nio.util.SharedOutputBuffer.write(SharedOutputBuffer.java:148)
> - locked <0xf17c13e0> (a java.lang.Object)
>  at
> org.apache.http.nio.entity.ContentOutputStream.write(ContentOutputStream.java:63)
> at javax.activation.DataHandler.writeTo(DataHandler.java:309)
>  at
> org.wso2.relay.ExpandingMessageFormatter.findAndWrite2OutputStream(ExpandingMessageFormatter.java:87)
> at
> org.wso2.relay.ExpandingMessageFormatter.writeTo(ExpandingMessageFormatter.java:56)
>  at
> org.apache.synapse.transport.nhttp.HttpCoreNIOSender.sendAsyncResponse(HttpCoreNIOSender.java:476)
> at
> org.apache.synapse.transport.nhttp.HttpCoreNIOSender.invoke(HttpCoreNIOSender.java:293)
>  at org.apache.axis2.engine.AxisEngine.send(AxisEngine.java:440)
> at org.apache.synapse.core.axis2.Axis2Sender.sendBack(Axis2Sender.java:138)
>  at
> org.apache.synapse.core.axis2.Axis2SynapseEnvironment.send(Axis2SynapseEnvironment.java:179)
> at
> org.apache.synapse.mediators.builtin.SendMediator.mediate(SendMediator.java:72)
>  at
> org.apache.synapse.mediators.AbstractListMediator.mediate(AbstractListMediator.java:60)
> at
> org.apache.synapse.mediators.filters.OutMediator.mediate(OutMediator.java:55)
>  at
> org.apache.synapse.mediators.AbstractListMediator.mediate(AbstractListMediator.java:60)
> at
> org.apache.synapse.mediators.base.SequenceMediator.mediate(SequenceMediator.java:115)
>  at
> org.apache.synapse.core.axis2.Axis2SynapseEnvironment.injectMessage(Axis2SynapseEnvironment.java:131)
> at
> org.apache.synapse.core.axis2.SynapseCallbackReceiver.handleMessage(SynapseCallbackReceiver.java:339)
>  at
> org.apache.synapse.core.axis2.SynapseCallbackReceiver.receive(SynapseCallbackReceiver.java:135)
> at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:178)
>  at
> org.apache.synapse.transport.nhttp.ClientWorker.run(ClientWorker.java:241)
> at
> org.apache.axis2.transport.base.threads.NativeWorkerPool$1.run(NativeWorkerPool.java:58)
>  at
> java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
> at
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
>  at java.lang.Thread.run(Thread.java:619)
>
> --
> Software Engineer, WSO2 Inc
> http://wso2.org
> supunk.blogspot.com
>
>
>


-- 
Software Engineer, WSO2 Inc
http://wso2.org
supunk.blogspot.com

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message