hc-httpclient-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Oleg Kalnichevski <ol...@apache.org>
Subject Re: ioreactor in active state, but one of the dispatchers is shut down
Date Fri, 04 Dec 2015 19:56:17 GMT
On Fri, 2015-12-04 at 18:15 +0000, Nitu Choudhary wrote:
> Hi,
> We are using the apache nio http client library, and are running into issues where the
ioreactor is active, but one of the dispatcher is shutdown. When the dispatcher was shutdown,
no exception was thrown (in some cases OutOfMemory was thrown), and so the exception value
is not set.
> Here is the code snippet (Worker in AbstractMultiworkerIOReactor.java):        @Override
       public void run() {            try {                this.dispatcher.execute(this.eventDispatch);
           } catch (final Exception ex) {                this.exception = ex;            }
        }
> 
> Now in this case if a throwable is thrown or if the dispatcher exits in some other fashion,
the exception bit is not set. Due to this the dispatcher is considered healthy, and we continue
to send requests to the dispatcher which it cannot service, and keeps around in the memory,
thus causing memory leak. There is no code to prevent the dispatcher from accepting request
if it is in shutdown mode. 
> Can you please let me know if this is a known issue? We would like to see if we can get
a patch to help fix the issue, we can help provide the patch if required.
> regards,nitu 

Please raise a JIRA for this issue. You are very welcome to propose a
fix by contributing a patch or opening a PR at GitHub.

Oleg 


---------------------------------------------------------------------
To unsubscribe, e-mail: httpclient-users-unsubscribe@hc.apache.org
For additional commands, e-mail: httpclient-users-help@hc.apache.org


Mime
View raw message