{"action":"created","comment":{"url":"https://api.github.com/repos/containous/traefik/pulls/comments/57924199","id":57924199,"diff_hunk":"@@ -412,6 +414,29 @@ func (server *Server) loadConfig(configurations configs, globalConfiguration Glo\n \t\t\t\t\t\t\t\t}\n \t\t\t\t\t\t\t}\n \t\t\t\t\t\t}\n+\t\t\t\t\t\t// retry ?\n+\t\t\t\t\t\tif globalConfiguration.Retry != nil {\n+\t\t\t\t\t\t\tretries := len(configuration.Backends[frontend.Backend].Servers) - 1\n+\t\t\t\t\t\t\tif globalConfiguration.Retry.Attempts > 0 {\n+\t\t\t\t\t\t\t\tretries = globalConfiguration.Retry.Attempts\n+\t\t\t\t\t\t\t}\n+\t\t\t\t\t\t\tmaxMem := int64(2 * 1024 * 1024)","path":"server.go","position":26,"original_position":26,"commit_id":"4a9e82903e50126f7e0fc086fdc8954943caf58f","original_commit_id":"4a9e82903e50126f7e0fc086fdc8954943caf58f","user":{"login":"vdemeester","id":6508,"avatar_url":"https://avatars.githubusercontent.com/u/6508?v=3","gravatar_id":"","url":"https://api.github.com/users/vdemeester","html_url":"https://github.com/vdemeester","followers_url":"https://api.github.com/users/vdemeester/followers","following_url":"https://api.github.com/users/vdemeester/following{/other_user}","gists_url":"https://api.github.com/users/vdemeester/gists{/gist_id}","starred_url":"https://api.github.com/users/vdemeester/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vdemeester/subscriptions","organizations_url":"https://api.github.com/users/vdemeester/orgs","repos_url":"https://api.github.com/users/vdemeester/repos","events_url":"https://api.github.com/users/vdemeester/events{/privacy}","received_events_url":"https://api.github.com/users/vdemeester/received_events","type":"User","site_admin":false},"body":"You probably should put this into a const ? :angel: ","created_at":"2016-03-30T16:58:18Z","updated_at":"2016-03-30T16:58:18Z","html_url":"https://github.com/containous/traefik/pull/267#discussion_r57924199","pull_request_url":"https://api.github.com/repos/containous/traefik/pulls/267","_links":{"self":{"href":"https://api.github.com/repos/containous/traefik/pulls/comments/57924199"},"html":{"href":"https://github.com/containous/traefik/pull/267#discussion_r57924199"},"pull_request":{"href":"https://api.github.com/repos/containous/traefik/pulls/267"}}},"pull_request":{"url":"https://api.github.com/repos/containous/traefik/pulls/267","id":64528569,"html_url":"https://github.com/containous/traefik/pull/267","diff_url":"https://github.com/containous/traefik/pull/267.diff","patch_url":"https://github.com/containous/traefik/pull/267.patch","issue_url":"https://api.github.com/repos/containous/traefik/issues/267","number":267,"state":"open","locked":false,"title":"add retries request","user":{"login":"emilevauge","id":6207234,"avatar_url":"https://avatars.githubusercontent.com/u/6207234?v=3","gravatar_id":"","url":"https://api.github.com/users/emilevauge","html_url":"https://github.com/emilevauge","followers_url":"https://api.github.com/users/emilevauge/followers","following_url":"https://api.github.com/users/emilevauge/following{/other_user}","gists_url":"https://api.github.com/users/emilevauge/gists{/gist_id}","starred_url":"https://api.github.com/users/emilevauge/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/emilevauge/subscriptions","organizations_url":"https://api.github.com/users/emilevauge/orgs","repos_url":"https://api.github.com/users/emilevauge/repos","events_url":"https://api.github.com/users/emilevauge/events{/privacy}","received_events_url":"https://api.github.com/users/emilevauge/received_events","type":"User","site_admin":false},"body":"This PR adds retry request in case of network error.\r\nYou can enable retry in your global config file adding `[retry]`.\r\nThe default config set a maximum storage in memory by request of 2 Mo and a maximum attempts of `(number servers in backend) -1`.\r\nYour can override this:\r\n\r\n```\r\n# Enable retry sending request if network error\r\n#\r\n# Optional\r\n#\r\n[retry]\r\n\r\n# Number of attempts\r\n#\r\n# Optional\r\n# Default: (number servers in backend) -1\r\n#\r\nattempts = 3\r\n\r\n# Sets the maximum request body to be stored in memory in Mo\r\n#\r\n# Optional\r\n# Default: 2\r\n#\r\nmaxMem = 3\r\n```\r\n\r\nFixes #210 \r\n\r\nSigned-off-by: Emile Vauge <emile@vauge.com>","created_at":"2016-03-29T20:29:01Z","updated_at":"2016-03-30T16:58:18Z","closed_at":null,"merged_at":null,"merge_commit_sha":"874aa09df7da9d7b7889501602208c435f5b2641","assignee":{"login":"vdemeester","id":6508,"avatar_url":"https://avatars.githubusercontent.com/u/6508?v=3","gravatar_id":"","url":"https://api.github.com/users/vdemeester","html_url":"https://github.com/vdemeester","followers_url":"https://api.github.com/users/vdemeester/followers","following_url":"https://api.github.com/users/vdemeester/following{/other_user}","gists_url":"https://api.github.com/users/vdemeester/gists{/gist_id}","starred_url":"https://api.github.com/users/vdemeester/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vdemeester/subscriptions","organizations_url":"https://api.github.com/users/vdemeester/orgs","repos_url":"https://api.github.com/users/vdemeester/repos","events_url":"https://api.github.com/users/vdemeester/events{/privacy}","received_events_url":"https://api.github.com/users/vdemeester/received_events","type":"User","site_admin":false},"milestone":{"url":"https://api.github.com/repos/containous/traefik/milestones/1","html_url":"https://github.com/containous/traefik/milestones/1.0","labels_url":"https://api.github.com/repos/containous/traefik/milestones/1/labels","id":1609475,"number":1,"title":"1.0","description":"","creator":{"login":"emilevauge","id":6207234,"avatar_url":"https://avatars.githubusercontent.com/u/6207234?v=3","gravatar_id":"","url":"https://api.github.com/users/emilevauge","html_url":"https://github.com/emilevauge","followers_url":"https://api.github.com/users/emilevauge/followers","following_url":"https://api.github.com/users/emilevauge/following{/other_user}","gists_url":"https://api.github.com/users/emilevauge/gists{/gist_id}","starred_url":"https://api.github.com/users/emilevauge/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/emilevauge/subscriptions","organizations_url":"https://api.github.com/users/emilevauge/orgs","repos_url":"https://api.github.com/users/emilevauge/repos","events_url":"https://api.github.com/users/emilevauge/events{/privacy}","received_events_url":"https://api.github.com/users/emilevauge/received_events","type":"User","site_admin":false},"open_issues":6,"closed_issues":50,"state":"open","created_at":"2016-02-27T14:44:28Z","updated_at":"2016-03-30T07:48:33Z","due_on":"2016-03-30T22:00:00Z","closed_at":null},"commits_url":"https://api.github.com/repos/containous/traefik/pulls/267/commits","review_comments_url":"https://api.github.com/repos/containous/traefik/pulls/267/comments","review_comment_url":"https://api.github.com/repos/containous/traefik/pulls/comments{/number}","comments_url":"https://api.github.com/repos/containous/traefik/issues/267/comments","statuses_url":"https://api.github.com/repos/containous/traefik/statuses/4a9e82903e50126f7e0fc086fdc8954943caf58f","head":{"label":"containous:add-retries","ref":"add-retries","sha":"4a9e82903e50126f7e0fc086fdc8954943caf58f","user":{"login":"containous","id":16349663,"avatar_url":"https://avatars.githubusercontent.com/u/16349663?v=3","gravatar_id":"","url":"https://api.github.com/users/containous","html_url":"https://github.com/containous","followers_url":"https://api.github.com/users/containous/followers","following_url":"https://api.github.com/users/containous/following{/other_user}","gists_url":"https://api.github.com/users/containous/gists{/gist_id}","starred_url":"https://api.github.com/users/containous/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/containous/subscriptions","organizations_url":"https://api.github.com/users/containous/orgs","repos_url":"https://api.github.com/users/containous/repos","events_url":"https://api.github.com/users/containous/events{/privacy}","received_events_url":"https://api.github.com/users/containous/received_events","type":"Organization","site_admin":false},"repo":{"id":42408804,"name":"traefik","full_name":"containous/traefik","owner":{"login":"containous","id":16349663,"avatar_url":"https://avatars.githubusercontent.com/u/16349663?v=3","gravatar_id":"","url":"https://api.github.com/users/containous","html_url":"https://github.com/containous","followers_url":"https://api.github.com/users/containous/followers","following_url":"https://api.github.com/users/containous/following{/other_user}","gists_url":"https://api.github.com/users/containous/gists{/gist_id}","starred_url":"https://api.github.com/users/containous/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/containous/subscriptions","organizations_url":"https://api.github.com/users/containous/orgs","repos_url":"https://api.github.com/users/containous/repos","events_url":"https://api.github.com/users/containous/events{/privacy}","received_events_url":"https://api.github.com/users/containous/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/containous/traefik","description":"Træfɪk, a modern reverse proxy","fork":false,"url":"https://api.github.com/repos/containous/traefik","forks_url":"https://api.github.com/repos/containous/traefik/forks","keys_url":"https://api.github.com/repos/containous/traefik/keys{/key_id}","collaborators_url":"https://api.github.com/repos/containous/traefik/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/containous/traefik/teams","hooks_url":"https://api.github.com/repos/containous/traefik/hooks","issue_events_url":"https://api.github.com/repos/containous/traefik/issues/events{/number}","events_url":"https://api.github.com/repos/containous/traefik/events","assignees_url":"https://api.github.com/repos/containous/traefik/assignees{/user}","branches_url":"https://api.github.com/repos/containous/traefik/branches{/branch}","tags_url":"https://api.github.com/repos/containous/traefik/tags","blobs_url":"https://api.github.com/repos/containous/traefik/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/containous/traefik/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/containous/traefik/git/refs{/sha}","trees_url":"https://api.github.com/repos/containous/traefik/git/trees{/sha}","statuses_url":"https://api.github.com/repos/containous/traefik/statuses/{sha}","languages_url":"https://api.github.com/repos/containous/traefik/languages","stargazers_url":"https://api.github.com/repos/containous/traefik/stargazers","contributors_url":"https://api.github.com/repos/containous/traefik/contributors","subscribers_url":"https://api.github.com/repos/containous/traefik/subscribers","subscription_url":"https://api.github.com/repos/containous/traefik/subscription","commits_url":"https://api.github.com/repos/containous/traefik/commits{/sha}","git_commits_url":"https://api.github.com/repos/containous/traefik/git/commits{/sha}","comments_url":"https://api.github.com/repos/containous/traefik/comments{/number}","issue_comment_url":"https://api.github.com/repos/containous/traefik/issues/comments{/number}","contents_url":"https://api.github.com/repos/containous/traefik/contents/{+path}","compare_url":"https://api.github.com/repos/containous/traefik/compare/{base}...{head}","merges_url":"https://api.github.com/repos/containous/traefik/merges","archive_url":"https://api.github.com/repos/containous/traefik/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/containous/traefik/downloads","issues_url":"https://api.github.com/repos/containous/traefik/issues{/number}","pulls_url":"https://api.github.com/repos/containous/traefik/pulls{/number}","milestones_url":"https://api.github.com/repos/containous/traefik/milestones{/number}","notifications_url":"https://api.github.com/repos/containous/traefik/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/containous/traefik/labels{/name}","releases_url":"https://api.github.com/repos/containous/traefik/releases{/id}","deployments_url":"https://api.github.com/repos/containous/traefik/deployments","created_at":"2015-09-13T19:04:02Z","updated_at":"2016-03-29T23:07:44Z","pushed_at":"2016-03-30T16:07:11Z","git_url":"git://github.com/containous/traefik.git","ssh_url":"git@github.com:containous/traefik.git","clone_url":"https://github.com/containous/traefik.git","svn_url":"https://github.com/containous/traefik","homepage":"https://traefik.io/","size":7033,"stargazers_count":1618,"watchers_count":1618,"language":"Go","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":93,"mirror_url":null,"open_issues_count":54,"forks":93,"open_issues":54,"watchers":1618,"default_branch":"master"}},"base":{"label":"containous:master","ref":"master","sha":"1d040dbdd219693e736827c6f25bc7cacaa76330","user":{"login":"containous","id":16349663,"avatar_url":"https://avatars.githubusercontent.com/u/16349663?v=3","gravatar_id":"","url":"https://api.github.com/users/containous","html_url":"https://github.com/containous","followers_url":"https://api.github.com/users/containous/followers","following_url":"https://api.github.com/users/containous/following{/other_user}","gists_url":"https://api.github.com/users/containous/gists{/gist_id}","starred_url":"https://api.github.com/users/containous/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/containous/subscriptions","organizations_url":"https://api.github.com/users/containous/orgs","repos_url":"https://api.github.com/users/containous/repos","events_url":"https://api.github.com/users/containous/events{/privacy}","received_events_url":"https://api.github.com/users/containous/received_events","type":"Organization","site_admin":false},"repo":{"id":42408804,"name":"traefik","full_name":"containous/traefik","owner":{"login":"containous","id":16349663,"avatar_url":"https://avatars.githubusercontent.com/u/16349663?v=3","gravatar_id":"","url":"https://api.github.com/users/containous","html_url":"https://github.com/containous","followers_url":"https://api.github.com/users/containous/followers","following_url":"https://api.github.com/users/containous/following{/other_user}","gists_url":"https://api.github.com/users/containous/gists{/gist_id}","starred_url":"https://api.github.com/users/containous/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/containous/subscriptions","organizations_url":"https://api.github.com/users/containous/orgs","repos_url":"https://api.github.com/users/containous/repos","events_url":"https://api.github.com/users/containous/events{/privacy}","received_events_url":"https://api.github.com/users/containous/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/containous/traefik","description":"Træfɪk, a modern reverse proxy","fork":false,"url":"https://api.github.com/repos/containous/traefik","forks_url":"https://api.github.com/repos/containous/traefik/forks","keys_url":"https://api.github.com/repos/containous/traefik/keys{/key_id}","collaborators_url":"https://api.github.com/repos/containous/traefik/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/containous/traefik/teams","hooks_url":"https://api.github.com/repos/containous/traefik/hooks","issue_events_url":"https://api.github.com/repos/containous/traefik/issues/events{/number}","events_url":"https://api.github.com/repos/containous/traefik/events","assignees_url":"https://api.github.com/repos/containous/traefik/assignees{/user}","branches_url":"https://api.github.com/repos/containous/traefik/branches{/branch}","tags_url":"https://api.github.com/repos/containous/traefik/tags","blobs_url":"https://api.github.com/repos/containous/traefik/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/containous/traefik/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/containous/traefik/git/refs{/sha}","trees_url":"https://api.github.com/repos/containous/traefik/git/trees{/sha}","statuses_url":"https://api.github.com/repos/containous/traefik/statuses/{sha}","languages_url":"https://api.github.com/repos/containous/traefik/languages","stargazers_url":"https://api.github.com/repos/containous/traefik/stargazers","contributors_url":"https://api.github.com/repos/containous/traefik/contributors","subscribers_url":"https://api.github.com/repos/containous/traefik/subscribers","subscription_url":"https://api.github.com/repos/containous/traefik/subscription","commits_url":"https://api.github.com/repos/containous/traefik/commits{/sha}","git_commits_url":"https://api.github.com/repos/containous/traefik/git/commits{/sha}","comments_url":"https://api.github.com/repos/containous/traefik/comments{/number}","issue_comment_url":"https://api.github.com/repos/containous/traefik/issues/comments{/number}","contents_url":"https://api.github.com/repos/containous/traefik/contents/{+path}","compare_url":"https://api.github.com/repos/containous/traefik/compare/{base}...{head}","merges_url":"https://api.github.com/repos/containous/traefik/merges","archive_url":"https://api.github.com/repos/containous/traefik/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/containous/traefik/downloads","issues_url":"https://api.github.com/repos/containous/traefik/issues{/number}","pulls_url":"https://api.github.com/repos/containous/traefik/pulls{/number}","milestones_url":"https://api.github.com/repos/containous/traefik/milestones{/number}","notifications_url":"https://api.github.com/repos/containous/traefik/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/containous/traefik/labels{/name}","releases_url":"https://api.github.com/repos/containous/traefik/releases{/id}","deployments_url":"https://api.github.com/repos/containous/traefik/deployments","created_at":"2015-09-13T19:04:02Z","updated_at":"2016-03-29T23:07:44Z","pushed_at":"2016-03-30T16:07:11Z","git_url":"git://github.com/containous/traefik.git","ssh_url":"git@github.com:containous/traefik.git","clone_url":"https://github.com/containous/traefik.git","svn_url":"https://github.com/containous/traefik","homepage":"https://traefik.io/","size":7033,"stargazers_count":1618,"watchers_count":1618,"language":"Go","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":93,"mirror_url":null,"open_issues_count":54,"forks":93,"open_issues":54,"watchers":1618,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/containous/traefik/pulls/267"},"html":{"href":"https://github.com/containous/traefik/pull/267"},"issue":{"href":"https://api.github.com/repos/containous/traefik/issues/267"},"comments":{"href":"https://api.github.com/repos/containous/traefik/issues/267/comments"},"review_comments":{"href":"https://api.github.com/repos/containous/traefik/pulls/267/comments"},"review_comment":{"href":"https://api.github.com/repos/containous/traefik/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/containous/traefik/pulls/267/commits"},"statuses":{"href":"https://api.github.com/repos/containous/traefik/statuses/4a9e82903e50126f7e0fc086fdc8954943caf58f"}}}}