RuralHunter · GitHub

It googled around and found it might be related to the core number of my CPU. But anyway all the tests using Jetty web server fails with this exception:

java.lang.IllegalStateException: Insufficient configured threads: required=5 < max=5 for QueuedThreadPool[qtp1712943792]@661972b0{STARTED,2<=2<=5,i=2,r=-1,q=0}[ReservedThreadExecutor@1a245833{reserved=0/1,pending=0}]
	at org.eclipse.jetty.util.thread.ThreadPoolBudget.check(ThreadPoolBudget.java:165)
	at org.eclipse.jetty.util.thread.ThreadPoolBudget.leaseTo(ThreadPoolBudget.java:141)
	at org.eclipse.jetty.util.thread.ThreadPoolBudget.leaseFrom(ThreadPoolBudget.java:191)
	at org.eclipse.jetty.io.SelectorManager.doStart(SelectorManager.java:255)
	at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:73)
	at org.eclipse.jetty.util.component.ContainerLifeCycle.start(ContainerLifeCycle.java:169)
	at org.eclipse.jetty.util.component.ContainerLifeCycle.doStart(ContainerLifeCycle.java:110)
	at org.eclipse.jetty.server.AbstractConnector.doStart(AbstractConnector.java:323)
	at org.eclipse.jetty.server.AbstractNetworkConnector.doStart(AbstractNetworkConnector.java:81)
	at org.eclipse.jetty.server.ServerConnector.doStart(ServerConnector.java:234)
	at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:73)
	at org.eclipse.jetty.server.Server.doStart(Server.java:401)
	at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:73)
	at com.gargoylesoftware.htmlunit.WebServerTestCase.tryStart(WebServerTestCase.java:392)
	at com.gargoylesoftware.htmlunit.WebDriverTestCase.startWebServer(WebDriverTestCase.java:653)
	at com.gargoylesoftware.htmlunit.WebDriverTestCase.loadPage2(WebDriverTestCase.java:941)
	at com.gargoylesoftware.htmlunit.WebDriverTestCase.loadPage2(WebDriverTestCase.java:902)
	at com.gargoylesoftware.htmlunit.WebDriverTestCase.loadPage2(WebDriverTestCase.java:891)
	at com.gargoylesoftware.htmlunit.javascript.host.xml.XMLHttpRequestTest.asyncIsDefault(XMLHttpRequestTest.java:301)

I increased the maxThreads parameter from 5 to 10 in this line and the error is gone.

Read the original on github.com ↗