From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Original-To: poffice@blade.nagaokaut.ac.jp Delivered-To: poffice@blade.nagaokaut.ac.jp Received: from kankan.nagaokaut.ac.jp (kankan.nagaokaut.ac.jp [133.44.2.24]) by blade.nagaokaut.ac.jp (Postfix) with ESMTP id 6B7AF19C0409 for ; Tue, 24 Nov 2015 08:54:24 +0900 (JST) Received: from voscc.nagaokaut.ac.jp (voscc.nagaokaut.ac.jp [133.44.1.100]) by kankan.nagaokaut.ac.jp (Postfix) with ESMTP id D4C12B5D8BD for ; Sat, 21 Nov 2015 06:43:00 +0900 (JST) Received: from neon.ruby-lang.org (neon.ruby-lang.org [221.186.184.75]) by voscc.nagaokaut.ac.jp (Postfix) with ESMTP id D424418CC7F2 for ; Sat, 21 Nov 2015 06:43:00 +0900 (JST) Received: from [221.186.184.76] (localhost [IPv6:::1]) by neon.ruby-lang.org (Postfix) with ESMTP id AF65F120467; Sat, 21 Nov 2015 06:42:55 +0900 (JST) X-Original-To: ruby-core@ruby-lang.org Delivered-To: ruby-core@ruby-lang.org Received: from o10.shared.sendgrid.net (o10.shared.sendgrid.net [173.193.132.135]) by neon.ruby-lang.org (Postfix) with ESMTPS id 20E91120036 for ; Sat, 21 Nov 2015 06:42:32 +0900 (JST) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sendgrid.me; h=from:to:references:subject:mime-version:content-type:content-transfer-encoding:list-id; s=smtpapi; bh=w1z+vGdMbzyglVHpap2eovyB1NQ=; b=NrgHWyg6TrPZRs7blG 2LZDBSm9yjZuae+W27sVVFYcEnm5QmyvPJKvzG+mWTOndY1SQjbb14w89NGi3Rj+ ejvJu2hnGtqdXNeeU5RyM3ayEqIJTCwW3lsTnKWS2LDqEKoeV0qQy2Sc4S07LJxM K22Njn/vCAyS1mjvC08/Xr6J8= Received: by filter0861p1mdw1.sendgrid.net with SMTP id filter0861p1mdw1.8138.564F93C38 2015-11-20 21:42:27.314794896 +0000 UTC Received: from herokuapp.com (ec2-54-162-185-103.compute-1.amazonaws.com [54.162.185.103]) by ismtpd0004p1iad1.sendgrid.net (SG) with ESMTP id 6DPAjSXzTRyioXlPcAyRcA for ; Fri, 20 Nov 2015 21:42:27.471 +0000 (UTC) Date: Fri, 20 Nov 2015 21:42:27 +0000 From: garett.shulman@gmail.com To: ruby-core@ruby-lang.org Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Redmine-MailingListIntegration-Message-Ids: 46283 X-Redmine-Project: ruby-trunk X-Redmine-Issue-Id: 10674 X-Redmine-Issue-Author: jlecour X-Redmine-Issue-Assignee: drbrain X-Redmine-Sender: shulmang X-Mailer: Redmine X-Redmine-Host: bugs.ruby-lang.org X-Redmine-Site: Ruby Issue Tracking System X-Auto-Response-Suppress: All Auto-Submitted: auto-generated X-SG-EID: ync6xU2WACa70kv/Ymy4QrNMhiuLXJG8OTL2vJD1yS5ewUt9kbhGWDYL/LXB5QCDiRslh6qmox70n5 zYBFRiYU6GAd6aisOskwc3Ma/DKMmjTAz1UHGx5jp8NjjLK+3YwfUTsfhoeA+YrUie7bUcnIEQ0Cbb ogFDKn4ckjSQRGk= X-ML-Name: ruby-core X-Mail-Count: 71614 Subject: [ruby-core:71614] [Ruby trunk - Feature #10674] Net::HTTP retries idempotent requests once after a timeout, but its not configurable X-BeenThere: ruby-core@ruby-lang.org X-Mailman-Version: 2.1.15 Precedence: list Reply-To: Ruby developers List-Id: Ruby developers List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: ruby-core-bounces@ruby-lang.org Sender: "ruby-core" Issue #10674 has been updated by Garett Shulman. I can confirm this exact behavior on 2.1.7 ---------------------------------------- Feature #10674: Net::HTTP retries idempotent requests once after a timeout,= but its not configurable https://bugs.ruby-lang.org/issues/10674#change-55015 * Author: J=C3=A9r=C3=A9my Lecour * Status: Open * Priority: Normal * Assignee: Eric Hodel ---------------------------------------- Hi, I've noticed that Net::HTTP retries idempotent requests once after a time-o= ut. It seems to adhere to the RFC 2616 (http://tools.ietf.org/html/rfc2616)= , but it is not always the best thing to do. When you don't know exactly how a remote web service works, it may be wise = to retry after a time-out. But when you know that a retry won't change anything, it should be possible= to disable this automatic retry. Otherwise, the server will have to deal w= ith 2 requests (instead of 1) and the client will effectively time-out twic= e later than expected (time for the first and second time-out). Having a basic "#retry=3D" (like we have "#read_timeout=3D" or "#open_timeo= ut" would be good first step. The value could be a simple boolean, or even an integer for the maximum num= ber of retries. The "Retry" middleware in Faraday has a more comprehensive feature set with= max retries, exponential back-off, =E2=80=A6 : https://github.com/lostisla= nd/faraday/blob/master/lib/faraday/request/retry.rb --=20 https://bugs.ruby-lang.org/