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 791B617A5C for ; Thu, 30 Apr 2015 10:48:40 +0000 (UTC) Received: (qmail 98567 invoked by uid 500); 30 Apr 2015 10:48:40 -0000 Delivered-To: apmail-hc-httpclient-users-archive@hc.apache.org Received: (qmail 98520 invoked by uid 500); 30 Apr 2015 10:48:40 -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 98508 invoked by uid 99); 30 Apr 2015 10:48:39 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 30 Apr 2015 10:48:39 +0000 X-ASF-Spam-Status: No, hits=2.2 required=5.0 tests=HTML_MESSAGE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: message received from 54.76.25.247 which is an MX secondary for httpclient-users@hc.apache.org) Received: from [54.76.25.247] (HELO mx1-eu-west.apache.org) (54.76.25.247) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 30 Apr 2015 10:48:12 +0000 Received: from mail-wg0-f53.google.com (mail-wg0-f53.google.com [74.125.82.53]) by mx1-eu-west.apache.org (ASF Mail Server at mx1-eu-west.apache.org) with ESMTPS id 46D0B2AB60 for ; Thu, 30 Apr 2015 10:48:11 +0000 (UTC) Received: by wgen6 with SMTP id n6so57557477wge.3 for ; Thu, 30 Apr 2015 03:46:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:content-type:message-id:mime-version:subject:date:references :to:in-reply-to; bh=e/L9+YLnaNj445sXF8+f2zMMD4XhqNr3AfSjCB+1wcg=; b=nLr8qr6XuO+6rw2PuxafukwxTigbQWvmhtPb663/y4IrJd0uQo4G2nGKDlmhqqWwd+ E6OrFyyTi7/KPnPBiQPQE60VARLzZqg5qgqVChkFjTY5eXGWHUYuxWNj+m4t3djIE/AO wAHatdS/0IfZIxhKD5GVCprQTNE3QM3nPUooat3hfchV6XQrmztvWGlqIbPdIrUMZBEW 38mI2jeU57cP01zxwQD/kuGRmnPuI7L4Q7+NjMefy9gxBPxDFhSBMDnINCJt2Js57M+q ibJKnKOctf3skIv+Pfk1dJ7CpANVm9L4M1QQjx54FQyBN05NMgAFXBQEdQpJw85HPcAe Krzw== X-Received: by 10.180.104.197 with SMTP id gg5mr4419414wib.27.1430390800784; Thu, 30 Apr 2015 03:46:40 -0700 (PDT) Received: from tomas-mbp-2.prog.int.avast.com ([91.213.143.252]) by mx.google.com with ESMTPSA id fo7sm1883493wic.1.2015.04.30.03.46.40 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 30 Apr 2015 03:46:40 -0700 (PDT) From: Tomas Tunkl Content-Type: multipart/alternative; boundary="Apple-Mail=_CBB59347-1DD9-4F29-A6CF-EAE1E5901A9C" Message-Id: Mime-Version: 1.0 (Mac OS X Mail 8.2 \(2098\)) Subject: Re: AbstractNIOConnPool and leasingRequests Date: Thu, 30 Apr 2015 12:46:39 +0200 References: <1430300166.2052.0@ok2consulting.com> <1430304115.2052.2@ok2consulting.com> <1430307965.2052.3@ok2consulting.com> To: HttpClient User Discussion In-Reply-To: <1430307965.2052.3@ok2consulting.com> X-Mailer: Apple Mail (2.2098) X-Virus-Checked: Checked by ClamAV on apache.org --Apple-Mail=_CBB59347-1DD9-4F29-A6CF-EAE1E5901A9C Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=us-ascii Yes, it seems that this is my problem. I have two dumps which are 5m = after each other. I have looked to AbstractNIOConnPool and I have in = leasing requests 350 then I have one route only in routeToPool and there I have: pending: 55 availble: 3 leased: 0 and these values are the same 5m after except the leasingRequests which = are higher, but it seems that pending has not moved and the objects are = the same. Even if I have configured SocketTimeout and Connection acquire = timeout to 10s When the request is removed from pending?=20 Thank you Tom > On 29. 4. 2015, at 13:46, Oleg Kalnichevski wrote: >=20 >=20 > 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 >=20 >=20 > 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. >=20 > Oleg >=20 >=20 >=20 >>> 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 =3D 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 = >=20 >=20 > --------------------------------------------------------------------- > To unsubscribe, e-mail: httpclient-users-unsubscribe@hc.apache.org = > For additional commands, e-mail: httpclient-users-help@hc.apache.org = --Apple-Mail=_CBB59347-1DD9-4F29-A6CF-EAE1E5901A9C--