Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 1C99E200B9A for ; Fri, 7 Oct 2016 15:20:03 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 1B203160AE8; Fri, 7 Oct 2016 13:20:03 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 605EF160AD6 for ; Fri, 7 Oct 2016 15:20:02 +0200 (CEST) Received: (qmail 75049 invoked by uid 500); 7 Oct 2016 13:20:01 -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 74987 invoked by uid 99); 7 Oct 2016 13:19:58 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd4-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 07 Oct 2016 13:19:58 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd4-us-west.apache.org (ASF Mail Server at spamd4-us-west.apache.org) with ESMTP id 5A882C0185 for ; Fri, 7 Oct 2016 13:19:58 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd4-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -0.101 X-Spam-Level: X-Spam-Status: No, score=-0.101 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_PASS=-0.001] autolearn=disabled Authentication-Results: spamd4-us-west.apache.org (amavisd-new); dkim=pass (1024-bit key) header.d=grupoventus.com header.b=QJbGpHMS; dkim=pass (1024-bit key) header.d=grupoventus.com header.b=QJbGpHMS Received: from mx1-lw-us.apache.org ([10.40.0.8]) by localhost (spamd4-us-west.apache.org [10.40.0.11]) (amavisd-new, port 10024) with ESMTP id 1mpyt_eGLAoc for ; Fri, 7 Oct 2016 13:19:57 +0000 (UTC) Received: from mail01.feelhosting.com (mail01.feelhosting.com [178.33.117.161]) by mx1-lw-us.apache.org (ASF Mail Server at mx1-lw-us.apache.org) with ESMTP id C55D05F23E for ; Fri, 7 Oct 2016 13:19:56 +0000 (UTC) Received: from mail01.ad-6bits.net (localhost.localdomain [127.0.0.1]) by mail01.ad-6bits.net (Postfix) with ESMTP id D2D0F40F93 for ; Fri, 7 Oct 2016 15:19:49 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=grupoventus.com; s=default; t=1475846389; bh=b9e39FmFjLT5HXyFzL+I198v8e/KzvRWqv/rxIdU+5E=; h=From:To:References:In-Reply-To:Subject:Date; b=QJbGpHMShQS7eaaRMa/zrWhc1IcNZ+0TwcrSBsf3qfaJ125GjOGw8LomxgK/HkqfZ ekW0hBCu9lCfOuHKvHiSBjVOsYk4oZxM6uUP7RhscBbRINcNHZq3zUXWKKG5VegMoP aGT4fbIphaa3Sb1aAG1xfgBusfk/SGApgmTOD0HU= Received: from Ventus (62.83.140.177.dyn.user.ono.com [62.83.140.177]) by mail01.ad-6bits.net (Postfix) with ESMTPA id 987DB403B3 for ; Fri, 7 Oct 2016 15:19:49 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=grupoventus.com; s=default; t=1475846389; bh=b9e39FmFjLT5HXyFzL+I198v8e/KzvRWqv/rxIdU+5E=; h=From:To:References:In-Reply-To:Subject:Date; b=QJbGpHMShQS7eaaRMa/zrWhc1IcNZ+0TwcrSBsf3qfaJ125GjOGw8LomxgK/HkqfZ ekW0hBCu9lCfOuHKvHiSBjVOsYk4oZxM6uUP7RhscBbRINcNHZq3zUXWKKG5VegMoP aGT4fbIphaa3Sb1aAG1xfgBusfk/SGApgmTOD0HU= From: =?utf-8?Q?Joan_Balaguer=C3=B3?= To: "'HttpClient User Discussion'" References: <000d01d2209b$3c510c90$b4f325b0$@grupoventus.com> <20161007131737.GC3508@localhost> In-Reply-To: <20161007131737.GC3508@localhost> Subject: RE: Socket timeout in the async http client Date: Fri, 7 Oct 2016 15:19:49 +0200 Message-ID: <001d01d2209d$7b9ce5c0$72d6b140$@grupoventus.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Mailer: Microsoft Outlook 14.0 Thread-Index: AQJLcgJR+/qgJVT2EiOl9a7+kRelPgHZGbVPn5uN/FA= Content-Language: es X-AV-Checked: ClamAV using ClamSMTP archived-at: Fri, 07 Oct 2016 13:20:03 -0000 Hi Dmitry, Thanks for the explanantion. It's clear now. Joan. -----Mensaje original----- De: Dmitry Potapov [mailto:potapov.d@gmail.com]=20 Enviado el: viernes, 7 de octubre de 2016 15:18 Para: HttpClient User Discussion Asunto: Re: Socket timeout in the async http client Hello Joan, Async client works on reactor model, so timeouts being checked only = between selects. You can change interval between selects by using setSelectInterval = function in IOReactorConfig builder: For example: IOReactorConfig.custom().setSelectInterval(100L).build(); Please be concern that reducing this value causes reactor threads to = consume more CPU resources. -- Dmitry On Fri, Oct 07, 2016 at 03:03:44PM +0200, Joan Balaguer=C3=B3 wrote: > Hello, >=20 > =20 >=20 > I=E2=80=99m setting the socket timeout on my requests as follows: > requestBuilder.setConfig(RequestConfig.copy(this.objHttp.getRequestCon > fig()) .setSocketTimeout(responseTimeoutToSet).build()); >=20 > =20 >=20 > I have double checked that the variable = =E2=80=98responseTimeoutToSet=E2=80=99 has the=20 > right value. So if I set up a socket timeout of 1000ms or 2000ms or=20 > 3000ms, it works fine. But if I set up a socket timeout of 1200ms, the = > exception is thrown after 2000ms. And if I set up a socket timeout of=20 > 2400ms, the exception is thrown after 3000ms. >=20 > =20 >=20 > Is this right behaviour with the async client? The blocking client=20 > respects strictly the socket timeout, but the async seems to skip from = > 1 to 2 to 3 seconds =E2=80=A6 >=20 > =20 >=20 > Thanks, >=20 > =20 >=20 > Joan. >=20 --------------------------------------------------------------------- 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