在glassfish 4.1中,我有以下错误:
[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)
]]
你知道它可能存在哪些问题吗?
答案 0 :(得分:2)
看看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>
但可以肯定的是,这可能会导致其他一些问题,因为它可能会耗尽最大可用资源。