2016-08-29 52 views
1

GlassFish中4.1,我有以下错误:Glassfish的:线程池的任务队列满

[2016-08-24T04:00:45.586+0200] [glassfish 4.1] [SEVERE] []  [org.glassfish.grizzly.nio.SelectorRunner] [tid: _ThreadID=34 _ThreadName=http-listener-1-kernel(1) SelectorRunner] [timeMillis: 1472004045586] [levelValue: 1000] [[ 
doSelect exception 
java.util.concurrent.RejectedExecutionException: The thread pool's task queue is full, limit: 4096 
    at org.glassfish.grizzly.threadpool.AbstractThreadPool.onTaskQueueOverflow(AbstractThreadPool.java:490) 
    at org.glassfish.grizzly.threadpool.QueueLimitedThreadPool.execute(QueueLimitedThreadPool.java:81) 
    at org.glassfish.grizzly.threadpool.GrizzlyExecutorService.execute(GrizzlyExecutorService.java:161) 
    at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy.executeIoEvent(WorkerThreadIOStrategy.java:100) 
    at org.glassfish.grizzly.strategies.AbstractIOStrategy.executeIoEvent(AbstractIOStrategy.java:89) 
    at org.glassfish.grizzly.nio.SelectorRunner.iterateKeyEvents(SelectorRunner.java:415) 
    at org.glassfish.grizzly.nio.SelectorRunner.iterateKeys(SelectorRunner.java:384) 
    at org.glassfish.grizzly.nio.SelectorRunner.doSelect(SelectorRunner.java:348) 
    at org.glassfish.grizzly.nio.SelectorRunner.run(SelectorRunner.java:279) 
    at org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:591) 
    at org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.run(AbstractThreadPool.java:571) 
    at java.lang.Thread.run(Unknown Source) 
]] 

做ü知道这是可能出现的问题?

回答

1

看看Glassfish官方Jira的this issue。它影响的版本与您的版本相同(它是为版本4.1_b10创建的,但对于4.1.1也是如此)并且尚未解决。您可以发布异常的构件作为对此问题的评论,以帮助解决此问题。

唯一的解决方案提供(但并非虽然推荐),是配置服务器的http-thread-pool,使其无限制通过改变max-queue-size大小值-1,作为

<thread-pools> 
    ... 
    <thread-pool name="http-thread-pool" max-queue-size="-1"></thread-pool> 
    ... 
</thread-pools> 

但可以肯定,这可能导致一些其他问题,因为它可能会用尽最大可用资源。