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 67AE42004A0 for ; Wed, 16 Aug 2017 23:01:02 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 65FAF1699CC; Wed, 16 Aug 2017 21:01:02 +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 ABA871699C8 for ; Wed, 16 Aug 2017 23:01:01 +0200 (CEST) Received: (qmail 56630 invoked by uid 500); 16 Aug 2017 21:00:59 -0000 Mailing-List: contact dev-help@hc.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "HttpComponents Project" Delivered-To: mailing list dev@hc.apache.org Received: (qmail 56617 invoked by uid 99); 16 Aug 2017 21:00:59 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd3-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 16 Aug 2017 21:00:59 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd3-us-west.apache.org (ASF Mail Server at spamd3-us-west.apache.org) with ESMTP id 1C2751807DC for ; Wed, 16 Aug 2017 21:00:59 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd3-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -0.399 X-Spam-Level: X-Spam-Status: No, score=-0.399 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, HTML_MESSAGE=2, NORMAL_HTTP_TO_IP=0.001, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-2.8, RCVD_IN_SORBS_SPAM=0.5, SPF_PASS=-0.001, WEIRD_PORT=0.001] autolearn=disabled Authentication-Results: spamd3-us-west.apache.org (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.com Received: from mx1-lw-us.apache.org ([10.40.0.8]) by localhost (spamd3-us-west.apache.org [10.40.0.10]) (amavisd-new, port 10024) with ESMTP id tXtCgxBdKueX for ; Wed, 16 Aug 2017 21:00:57 +0000 (UTC) Received: from mail-io0-f170.google.com (mail-io0-f170.google.com [209.85.223.170]) by mx1-lw-us.apache.org (ASF Mail Server at mx1-lw-us.apache.org) with ESMTPS id 7AFC45FD91 for ; Wed, 16 Aug 2017 21:00:57 +0000 (UTC) Received: by mail-io0-f170.google.com with SMTP id g35so17167855ioi.3 for ; Wed, 16 Aug 2017 14:00:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:from:date:message-id:subject:to; bh=Cukl0LliMke+1JOfFDVPz23N27W1KanCMg/ALhpt/pA=; b=FpPV76ikjL5IQ6fTVplPC3NqwWJQzTRHOtp6DpNdHO0msk1LGWTP9OvS/JSwYtyokf 6vaBO265sVumHPWBaUE4nr3974lQ9dhcHEhnfC9fX+XnPW/6+Xh71wvXHd+poLr6Ebsm uHGBpmMm+6j0Vhj4uNR4rtFqxnQFke2jTZBmLCIVhWamsRCaIY0MAKrVDRAB34gAyJCa 2Xj2hpTL62onq/GwxnX0Ecm/k4Qwtru3RNrFU+ptrUo2Tf7Dh4sZbPEBDWIFIOaledrV oxdAVkg6d4MRuHT9mPwTu9KTK4YiV7HXMZjkvA7QsyvsjktgxNuqLjeqiXbLY22Vpwqd Imug== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=Cukl0LliMke+1JOfFDVPz23N27W1KanCMg/ALhpt/pA=; b=KFhunX+x/j7neHYqqJPkqQvWN0v9fW0AxeA+bH9mWIfMromJZf+hlNKp8dWUpOM4iV 4USmzxsI+2QNn0B3SE6t2giRpl70z63P9qGnq6MSNIiGV7nAGCJIF3wR+50pkkt25481 5waAgswwCiV7/pyWpYCZ/aedSrVaZ7ptsu6XleRpKMkakvoT3mGhID7sSVLpSJLBT1PA TS28kLkS3bIHVmFVr7pejDyCNf13Nf1uZLXHv+YBBKggUoa8zYH31eIl00GfP8NZ4Ord Gq3Gli4Rs7/DFzkG47oYHLz3i/UC0LY/nS4TnVH7O3N8gv0Zrp980Her7jn/6gkBHspv N7tQ== X-Gm-Message-State: AHYfb5g1V3eq80YoVzhxdU7vRF9ofNnwDH2fpXdsxXFivdrbWsKkA2cE u/pNWH9S0PAntN8k+O4SCFsUMv4xZbsgfpo= X-Received: by 10.107.52.84 with SMTP id b81mr2606244ioa.186.1502917250599; Wed, 16 Aug 2017 14:00:50 -0700 (PDT) MIME-Version: 1.0 Received: by 10.2.92.19 with HTTP; Wed, 16 Aug 2017 14:00:50 -0700 (PDT) From: Gary Gregory Date: Wed, 16 Aug 2017 15:00:50 -0600 Message-ID: Subject: Core 4 and problem with socket timeout to origin server To: HttpComponents Project Content-Type: multipart/alternative; boundary="001a11441148d9528f0556e53061" archived-at: Wed, 16 Aug 2017 21:01:02 -0000 --001a11441148d9528f0556e53061 Content-Type: text/plain; charset="UTF-8" Hi All (Oleg, really) I am wondering how to fix/deal with the a timeout occurring in an async proxy when an origin server takes too long to reply. You can reproduce this issue with our asyn example NHttpReverseProxy: Start it with: http://postman-echo.com 8888 Then run: curl --verbose --max-time 1000 http://localhost:8888/delay/3 and you will get an EMPTY response from the server, no HTTP status code where I would expect a 504 or 500. The proxy prints out: Reverse proxy to http://postman-echo.com:80 [client->proxy] connection open 127.0.0.1:8888<->127.0.0.1:61128 [client->proxy] 00000001 GET /delay/3 HTTP/1.1 [client->proxy] 00000001 request completed [proxy->origin] connection open 192.168.0.112:61130<->52.44.234.173:80 [proxy->origin] 00000001 GET /delay/3 HTTP/1.1 [proxy->origin] 00000001 request completed [client->proxy] connection closed 127.0.0.1:8888<->127.0.0.1:61128 [client<-proxy] 00000001 java.net.SocketTimeoutException [proxy->origin] connection released 192.168.0.112:61130<->52.44.234.173:80 [proxy->origin] [total kept alive: 0; total allocated: 0 of 100] [proxy->origin] connection closed 192.168.0.112:61130<->52.44.234.173:80 Curl prints: * STATE: INIT => CONNECT handle 0x600057930; line 1410 (connection #-5000) * Added connection 0. The cache now contains 1 members * STATE: CONNECT => WAITRESOLVE handle 0x600057930; line 1446 (connection #0) * Trying ::1... * TCP_NODELAY set * STATE: WAITRESOLVE => WAITCONNECT handle 0x600057930; line 1527 (connection #0) * Trying 127.0.0.1... * TCP_NODELAY set * Connected to localhost (127.0.0.1) port 8888 (#0) * STATE: WAITCONNECT => SENDPROTOCONNECT handle 0x600057930; line 1579 (connection #0) * Marked for [keep alive]: HTTP default * STATE: SENDPROTOCONNECT => DO handle 0x600057930; line 1597 (connection #0) > GET /delay/3 HTTP/1.1 > Host: localhost:8888 > User-Agent: curl/7.54.1 > Accept: */* > * STATE: DO => DO_DONE handle 0x600057930; line 1676 (connection #0) * STATE: DO_DONE => WAITPERFORM handle 0x600057930; line 1801 (connection #0) * STATE: WAITPERFORM => PERFORM handle 0x600057930; line 1811 (connection #0) * STATE: PERFORM => DONE handle 0x600057930; line 1980 (connection #0) * multi_done * Empty reply from server * Connection #0 to host localhost left intact * Expire cleared *curl: (52) Empty reply from server* A bug in the example proxy? In HttpCore? Both? Or something missing in the implementation of the example async proxy? Thoughts? Thank you, Gary --001a11441148d9528f0556e53061--