0

我们遇到了这个问题,它说客户端线程池已满。客户端 JVM 上创建的线程数是否有限制

2012-11-12 10:09:54,206 [AWT-EventQueue-0] ERROR com.splwg.oms.client.util.ClientThreadPool:  The client thread pool is full
java.lang.Exception: Stack Trace:
                at com.splwg.oms.client.util.ClientThreadPool.dumpExtendedStack(ClientThreadPool.java:49)
                at com.splwg.oms.client.util.ClientThreadPool$MyRejectedHandler.rejectedExecution(ClientThreadPool.java:169)
                at java.util.concurrent.ThreadPoolExecutor.reject(Unknown Source)
                at java.util.concurrent.ThreadPoolExecutor.execute(Unknown Source)
                at java.util.concurrent.AbstractExecutorService.submit(Unknown Source)
                at com.splwg.oms.jbot.adapter.JBotAdapter.processCommands(JBotAdapter.java:652)
                at com.splwg.oms.jbot.adapter.JBotAdapter.processEvent(JBotAdapter.java:591)
                at com.splwg.oms.jbot.listener.JTableAdapterListener.valueChanged(JTableAdapterListener.java:106)
                at com.splwg.oms.jbot.listener.JTableAdapterListener.selected(JTableAdapterListener.java:41)
                at com.splwg.oms.jbot.component.JBotTable.fireJBotSelection(JBotTable.java:376)
                at com.splwg.oms.jbot.component.JBotTable.changeSelection(JBotTable.java:240)
                at javax.swing.plaf.basic.BasicTableUI$Handler.mouseDragged(Unknown Source)
                at java.awt.AWTEventMulticaster.mouseDragged(Unknown Source)
                at java.awt.Component.processMouseMotionEvent(Unknown Source)
                at javax.swing.JComponent.processMouseMotionEvent(Unknown Source)
                at java.awt.Component.processEvent(Unknown Source)
                at java.awt.Container.processEvent(Unknown Source)
                at java.awt.Component.dispatchEventImpl(Unknown Source)
                at java.awt.Container.dispatchEventImpl(Unknown Source)
                at java.awt.Component.dispatchEvent(Unknown Source)
                at java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source)
                at java.awt.LightweightDispatcher.processMouseEvent(Unknown Source)
                at java.awt.LightweightDispatcher.dispatchEvent(Unknown Source)
                at java.awt.Container.dispatchEventImpl(Unknown Source)
                at java.awt.Window.dispatchEventImpl(Unknown Source)
                at java.awt.Component.dispatchEvent(Unknown Source)
                at java.awt.EventQueue.dispatchEventImpl(Unknown Source)
                at java.awt.EventQueue.access$000(Unknown Source)
                at java.awt.EventQueue$1.run(Unknown Source)
                at java.awt.EventQueue$1.run(Unknown Source)
                at java.security.AccessController.doPrivileged(Native Method)
                at java.security.AccessControlContext$1.doIntersectionPrivilege(Unknown Source)
                at java.security.AccessControlContext$1.doIntersectionPrivilege(Unknown Source)
                at java.awt.EventQueue$2.run(Unknown Source)
                at java.awt.EventQueue$2.run(Unknown Source)
                at java.security.AccessController.doPrivileged(Native Method)
                at java.security.AccessControlContext$1.doIntersectionPrivilege(Unknown Source)
                at java.awt.EventQueue.dispatchEvent(Unknown Source)
                at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
                at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
                at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
                at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
                at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
                at java.awt.EventDispatchThread.run(Unknown Source)
2012-11-12 10:09:54,206 [AWT-EventQueue-0] ERROR com.splwg.oms.jbot.adapter.JDialogAdapter:  eventID = SelectPerform
java.util.concurrent.RejectedExecutionException
                at com.splwg.oms.client.util.ClientThreadPool$MyRejectedHandler.rejectedExecution(ClientThreadPool.java:170)
                at java.util.concurrent.ThreadPoolExecutor.reject(Unknown Source)
                at java.util.concurrent.ThreadPoolExecutor.execute(Unknown Source)
                at java.util.concurrent.AbstractExecutorService.submit(Unknown Source)
                at com.splwg.oms.jbot.adapter.JBotAdapter.processCommands(JBotAdapter.java:652)
                at com.splwg.oms.jbot.adapter.JBotAdapter.processEvent(JBotAdapter.java:591)
                at com.splwg.oms.jbot.listener.JTableAdapterListener.valueChanged(JTableAdapterListener.java:106)
                at com.splwg.oms.jbot.listener.JTableAdapterListener.selected(JTableAdapterListener.java:41)
                at com.splwg.oms.jbot.component.JBotTable.fireJBotSelection(JBotTable.java:376)
                at com.splwg.oms.jbot.component.JBotTable.changeSelection(JBotTable.java:240)
                at javax.swing.plaf.basic.BasicTableUI$Handler.mouseDragged(Unknown Source)
                at java.awt.AWTEventMulticaster.mouseDragged(Unknown Source)
                at java.awt.Component.processMouseMotionEvent(Unknown Source)
                at javax.swing.JComponent.processMouseMotionEvent(Unknown Source)
                at java.awt.Component.processEvent(Unknown Source)
                at java.awt.Container.processEvent(Unknown Source)
                at java.awt.Component.dispatchEventImpl(Unknown Source)
                at java.awt.Container.dispatchEventImpl(Unknown Source)
                at java.awt.Component.dispatchEvent(Unknown Source)
                at java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source)
                at java.awt.LightweightDispatcher.processMouseEvent(Unknown Source)
                at java.awt.LightweightDispatcher.dispatchEvent(Unknown Source)
                at java.awt.Container.dispatchEventImpl(Unknown Source)
                at java.awt.Window.dispatchEventImpl(Unknown Source)
                at java.awt.Component.dispatchEvent(Unknown Source)
                at java.awt.EventQueue.dispatchEventImpl(Unknown Source)
                at java.awt.EventQueue.access$000(Unknown Source)
                at java.awt.EventQueue$1.run(Unknown Source)
                at java.awt.EventQueue$1.run(Unknown Source)
                at java.security.AccessController.doPrivileged(Native Method)
                at java.security.AccessControlContext$1.doIntersectionPrivilege(Unknown Source)
                at java.security.AccessControlContext$1.doIntersectionPrivilege(Unknown Source)
                at java.awt.EventQueue$2.run(Unknown Source)
                at java.awt.EventQueue$2.run(Unknown Source)
                at java.security.AccessController.doPrivileged(Native Method)
                at java.security.AccessControlContext$1.doIntersectionPrivilege(Unknown Source)
                at java.awt.EventQueue.dispatchEvent(Unknown Source)
                at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
                at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
                at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
                at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
                at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
                at java.awt.EventDispatchThread.run(Unknown Source)
4

1 回答 1

2

这意味着您的线程池无法像添加任务一样快地完成任务 - 队列会不断增长,直到您用完空间。解决方案:

  • 更多线程(有一个限制,您将不会有任何改进)
  • 更大或无限的队列(部分解决,只会延迟问题)
  • 较小的任务(你最好的选择)
于 2012-11-12T21:44:56.037 回答