[Performance Tuning] - Large number of threads/connections marked "keep alive"
by Ben Hsu
Ben Hsu [http://community.jboss.org/people/benhsu_at_bluefly] created the discussion
"Large number of threads/connections marked "keep alive""
To view the discussion, visit: http://community.jboss.org/message/587341#587341
--------------------------------------------------------------
Hello
We're seeing an issue where the performance of our application would degrade over time, to the point where its unresponsive. Based on what I see, I think it might be related to how we're configuring keep-alive, and I'm wondering where I can find more information about configuring keep-alive in JBoss.
The symptoms:
- The application's performance would degrade over the day
- eventually we will get a message saying "all 200 threads are busy, please increase the maximum thread count"
- at this point, doing a thread dump (using "kill -3") shows many threads in the following state:
<blockquote>
"TP-Processor200" daemon prio=1 tid=0x0000002b31e372c0 nid=0x651a runnable [0x000000005408e000..0x000000005408ec30]
at java.net.SocketInputStream.socketRead0(Native Method)
at java.net.SocketInputStream.read(SocketInputStream.java:129)
at java.io.BufferedInputStream.fill(BufferedInputStream.java:218)
at java.io.BufferedInputStream.read1(BufferedInputStream.java:256)
at java.io.BufferedInputStream.read(BufferedInputStream.java:313)
- locked <0x0000002b082abec0> (a java.io.BufferedInputStream)
at org.apache.jk.common.ChannelSocket.read(ChannelSocket.java:620)
at org.apache.jk.common.ChannelSocket.receive(ChannelSocket.java:558)
at org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.java:685)
at org.apache.jk.common.ChannelSocket$SocketConnection.runIt(ChannelSocket.java:889)
at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
at java.lang.Thread.run(Thread.java:595)
</blockquote>
- when I look at the "connection scoreboard" in the JBoss web console, I see 200 connections marked with a "K" for "keep alive", also these connections look like they've been around for a long time (around 7,000,000ms, which will be 2 hours), long after we've killed all the clientsd
Based on what I saw above and some googling, I'm thinking this might be related to how we're configuring keep alive. I haven't been able to go further than this, because I don't know much about JBoss configuration. Does anybody have any information about how keep alive is being configured in JBoss?
We are using JBoss version 4.0.5 GA
Thank you!
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/587341#587341]
Start a new discussion in Performance Tuning at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&cont...]
13 years, 2 months
[jBPM] - Incorrect Gateway diverge and converge operations in jBPM 5
by shashi mhatre
shashi mhatre [http://community.jboss.org/people/khalipili] created the discussion
"Incorrect Gateway diverge and converge operations in jBPM 5"
To view the discussion, visit: http://community.jboss.org/message/581930#581930
--------------------------------------------------------------
I am using below sample flow in my test. it contains three human task. once the process process is started it execute successfully till human task creation. As the first gateway diverge is of type "AND" it creates two task as shown below. I can view these task in jbpm-console. now once i login as user "Shashi" and complete the first task, As the next gateway converge is of type "XOR", the flow proceeds further and create the next task for user "Shashi".
As process have proceed further till gateway converge, jbpm should have remove the task for user "kris". but jbpm still shows the task for user "kris".
this seems to be a error in jbpm process execution.
next once user "shashi" completes the human task, process execution completes but throws below error. it seems that human task handler tries to abort the "kris" task which should have be aborted prior (at gateway converge).
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
java.lang.IllegalArgumentException: attempt to create merge event with null entity
at org.hibernate.event.MergeEvent.<init>(MergeEvent.java:60)
at org.hibernate.event.MergeEvent.<init>(MergeEvent.java:43)
at org.hibernate.impl.SessionImpl.merge(SessionImpl.java:688)
at org.hibernate.impl.SessionImpl.merge(SessionImpl.java:692)
at org.hibernate.ejb.AbstractEntityManagerImpl.merge(AbstractEntityManagerImpl.java:235)
at org.drools.persistence.processinstance.JPAWorkItemManager.abortWorkItem(JPAWorkItemManager.java:124)
at org.drools.command.runtime.process.AbortWorkItemCommand.execute(AbortWorkItemCommand.java:56)
at org.drools.command.runtime.process.AbortWorkItemCommand.execute(AbortWorkItemCommand.java:29)
at org.drools.persistence.session.SingleSessionCommandService.execute(SingleSessionCommandService.java:274)
at org.drools.command.impl.CommandBasedStatefulKnowledgeSession$1.abortWorkItem(CommandBasedStatefulKnowledgeSession.java:149)
at com.sample.util.CommandBasedWSHumanTaskHandler$GetCompletedTaskResponseHandler.execute(CommandBasedWSHumanTaskHandler.java:257)
at org.jbpm.task.service.TaskClientHandler.messageReceived(TaskClientHandler.java:81)
at org.jbpm.task.service.mina.MinaTaskClientHandler.messageReceived(MinaTaskClientHandler.java:47)
at org.apache.mina.core.filterchain.DefaultIoFilterChain$TailFilter.messageReceived(DefaultIoFilterChain.java:713)
at org.apache.mina.core.filterchain.DefaultIoFilterChain.callNextMessageReceived(DefaultIoFilterChain.java:434)
at org.apache.mina.core.filterchain.DefaultIoFilterChain.access$1200(DefaultIoFilterChain.java:46)
at org.apache.mina.core.filterchain.DefaultIoFilterChain$EntryImpl$1.messageReceived(DefaultIoFilterChain.java:793)
at org.apache.mina.filter.codec.ProtocolCodecFilter$ProtocolDecoderOutputImpl.flush(ProtocolCodecFilter.java:375)
at org.apache.mina.filter.codec.ProtocolCodecFilter.messageReceived(ProtocolCodecFilter.java:229)
at org.apache.mina.core.filterchain.DefaultIoFilterChain.callNextMessageReceived(DefaultIoFilterChain.java:434)
at org.apache.mina.core.filterchain.DefaultIoFilterChain.access$1200(DefaultIoFilterChain.java:46)
at org.apache.mina.core.filterchain.DefaultIoFilterChain$EntryImpl$1.messageReceived(DefaultIoFilterChain.java:793)
at org.apache.mina.core.filterchain.IoFilterAdapter.messageReceived(IoFilterAdapter.java:119)
at org.apache.mina.core.filterchain.DefaultIoFilterChain.callNextMessageReceived(DefaultIoFilterChain.java:434)
at org.apache.mina.core.filterchain.DefaultIoFilterChain.fireMessageReceived(DefaultIoFilterChain.java:426)
at org.apache.mina.core.polling.AbstractPollingIoProcessor.read(AbstractPollingIoProcessor.java:638)
at org.apache.mina.core.polling.AbstractPollingIoProcessor.process(AbstractPollingIoProcessor.java:598)
at org.apache.mina.core.polling.AbstractPollingIoProcessor.process(AbstractPollingIoProcessor.java:587)
at org.apache.mina.core.polling.AbstractPollingIoProcessor.access$400(AbstractPollingIoProcessor.java:61)
at org.apache.mina.core.polling.AbstractPollingIoProcessor$Processor.run(AbstractPollingIoProcessor.java:969)
at org.apache.mina.util.NamePreservingRunnable.run(NamePreservingRunnable.java:64)
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:662)
[2011:01:19 17:01:78:exception] Uncaught exception on client
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
. http://community.jboss.org/servlet/JiveServlet/showImage/2-581930-11171/S... http://community.jboss.org/servlet/JiveServlet/downloadImage/2-581930-111...
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/581930#581930]
Start a new discussion in jBPM at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&cont...]
13 years, 3 months