Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

When pool is exhausted the request is ignored instead of returning 5xx #1871

Open
arinban opened this issue Oct 6, 2016 · 4 comments
Open

Comments

@arinban
Copy link

arinban commented Oct 6, 2016

This is the stack:

org.glassfish.grizzly.nio.SelectorRunner notifyConnectionException
SEVERE: doSelect exception
java.util.concurrent.RejectedExecutionException: Task org.mule.module.http.internal.listener.grizzly.ExecutorPerServerAddressIOStrategy$WorkerThreadRunnable@1ad391bf rejected from com.mulesoft.mule.config.pool.MonitoredThreadPoolExecutor@34845b35[Running, pool size = 1, active threads = 1, queued tasks = 0, completed tasks = 1]
	at java.util.concurrent.ThreadPoolExecutor$AbortPolicy.rejectedExecution(ThreadPoolExecutor.java:2048)
	at java.util.concurrent.ThreadPoolExecutor.reject(ThreadPoolExecutor.java:821)
	at java.util.concurrent.ThreadPoolExecutor.execute(ThreadPoolExecutor.java:1372)
	at org.mule.work.MuleWorkManager.execute(MuleWorkManager.java:210)
	at org.mule.module.http.internal.listener.grizzly.ExecutorPerServerAddressIOStrategy.executeIoEvent(ExecutorPerServerAddressIOStrategy.java:70)
	at org.glassfish.grizzly.strategies.AbstractIOStrategy.executeIoEvent(AbstractIOStrategy.java:89)
	at org.glassfish.grizzly.nio.SelectorRunner.iterateKeyEvents(SelectorRunner.java:414)
	at org.glassfish.grizzly.nio.SelectorRunner.iterateKeys(SelectorRunner.java:383)
	at org.glassfish.grizzly.nio.SelectorRunner.doSelect(SelectorRunner.java:347)
	at org.glassfish.grizzly.nio.SelectorRunner.run(SelectorRunner.java:278)
	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(Thread.java:745)

I understand that if the connection pool is exhausted it doesn't make sense to allocate more resources to answer all the requests with 500 but maybe the selector could be doing that.

Affected Versions

[2.3.26]

@arinban
Copy link
Author

arinban commented Oct 6, 2016

@glassfishrobot Commented
Reported by alepulver

@arinban
Copy link
Author

arinban commented Oct 6, 2016

@glassfishrobot Commented
@rlubke said:
The problem I see is that the Selector is protocol agnostic.

We may be able to tweak the logic a bit to invoke a callback on the SelectorHandler where a custom SelectorHandler implementation could take action appropriate to their application.

Will need to think on this a bit.

@arinban
Copy link
Author

arinban commented Apr 26, 2017

@glassfishrobot Commented
This issue was imported from java.net JIRA GRIZZLY-1871

@arinban
Copy link
Author

arinban commented Feb 3, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant