Return-Path: X-Original-To: apmail-hc-httpclient-users-archive@www.apache.org Delivered-To: apmail-hc-httpclient-users-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id C9CA5186BC for ; Wed, 29 Apr 2015 11:47:02 +0000 (UTC) Received: (qmail 77769 invoked by uid 500); 29 Apr 2015 11:47:02 -0000 Delivered-To: apmail-hc-httpclient-users-archive@hc.apache.org Received: (qmail 77724 invoked by uid 500); 29 Apr 2015 11:47:02 -0000 Mailing-List: contact httpclient-users-help@hc.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "HttpClient User Discussion" Delivered-To: mailing list httpclient-users@hc.apache.org Received: (qmail 77704 invoked by uid 99); 29 Apr 2015 11:47:02 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 29 Apr 2015 11:47:02 +0000 X-ASF-Spam-Status: No, hits=0.0 required=5.0 tests= X-Spam-Check-By: apache.org Received-SPF: error (athena.apache.org: local policy) Received: from [54.164.171.186] (HELO mx1-us-east.apache.org) (54.164.171.186) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 29 Apr 2015 11:46:56 +0000 Received: from kalnich2.nine.ch (kalnich2.nine.ch [5.148.180.21]) by mx1-us-east.apache.org (ASF Mail Server at mx1-us-east.apache.org) with ESMTP id AA92E43BAB for ; Wed, 29 Apr 2015 11:46:13 +0000 (UTC) Received: from [192.168.1.121] (77-57-180-223.dclient.hispeed.ch [77.57.180.223]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by kalnich2.nine.ch (Postfix) with ESMTPSA id E9D461600FB for ; Wed, 29 Apr 2015 11:46:04 +0000 (UTC) Date: Wed, 29 Apr 2015 13:46:05 +0200 From: Oleg Kalnichevski Subject: Re: AbstractNIOConnPool and leasingRequests To: HttpClient User Discussion Message-Id: <1430307965.2052.3@ok2consulting.com> In-Reply-To: References: <1430300166.2052.0@ok2consulting.com> <1430304115.2052.2@ok2consulting.com> X-Mailer: geary/0.10.0 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed X-Virus-Checked: Checked by ClamAV on apache.org On Wed, Apr 29, 2015 at 1:02 PM, Tomas Tunkl wrote: > My problem is that client has stopped sending requests, and I have > noticed that leasingRequests are not getting empty. So I was thinking > whether this could be my problem. > > Thank you > Tom Lease request backlog get processed every time a connection gets released back to the pool (there are other cases such as connect failure or timeout, but connection release is the primary one). If lease requests get piling up in the queue, that most likely means that the pool has been exhausted and leased connections are not being released back to the pool. Oleg > >> On 29. 4. 2015, at 12:41, Oleg Kalnichevski >> wrote: >> >> >> On Wed, Apr 29, 2015 at 12:31 PM, Tomas Tunkl >> wrote: >>> Hi, >>> I have noticed that. But: >>> processPendingRequests is called only by enumAvailable or >>> enumLeased, which are called by closeExpired and closeIdle, these >>> are called explicitly right? >>> processNextPendingRequest is called release(explicitly called), >>> requestCancelled, requestFailed, requestTimeout and these are >>> called in InternalSessionRequestCallback. By corresponding methods. >>> But as I understand the problem to get to this some request has to >>> be able to do: >>> final SessionRequest sessionRequest = this.ioreactor.connect( >>> remoteAddress, localAddress, route, >>> this.sessionRequestCallback); >>> Which doesnt have to happen. And in that case the requests are >>> there forever. There is no automatic remove of requests from >>> leasingRequests >>> Tom >> >> I am sorry but I am not sure I understand the problem you are >> having. >> >> Oleg >> >> >>>> On 29. 4. 2015, at 11:36, Oleg Kalnichevski >>>> wrote: >>>> On Tue, Apr 28, 2015 at 9:14 AM, Tomas Tunkl >>>> wrote: >>>>> Hi, >>>>> I have some problems with ApacheAsyncHttpClient. I have tracked >>>>> the problems to one specific place I am interested in. >>>>> In AbstractNIOConnPool I can see that I have in leasingRequests >>>>> 112 entries. I have searched the code and couldnt find how the >>>>> entries are processed. I believe that request gets to >>>>> leasingRequests when it cannot get connection, because all are >>>>> used. But when the requests gets another chance? It seems to me, >>>>> that it is stuck there forever. >>>> Leasing requests are processed by #processNextPendingRequest and >>>> #processPendingRequests methods. >>>> Oleg >>>> >>>> --------------------------------------------------------------------- >>>> To unsubscribe, e-mail: httpclient-users-unsubscribe@hc.apache.org >>>> For additional commands, e-mail: >>>> httpclient-users-help@hc.apache.org >>> >>> --------------------------------------------------------------------- >>> To unsubscribe, e-mail: httpclient-users-unsubscribe@hc.apache.org >>> For additional commands, e-mail: >>> httpclient-users-help@hc.apache.org >> >> >> >> --------------------------------------------------------------------- >> To unsubscribe, e-mail: httpclient-users-unsubscribe@hc.apache.org >> For additional commands, e-mail: httpclient-users-help@hc.apache.org >> > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: httpclient-users-unsubscribe@hc.apache.org > For additional commands, e-mail: httpclient-users-help@hc.apache.org > --------------------------------------------------------------------- To unsubscribe, e-mail: httpclient-users-unsubscribe@hc.apache.org For additional commands, e-mail: httpclient-users-help@hc.apache.org