{"action":"created","issue":{"url":"https://api.github.com/repos/docker/docker/issues/9759","labels_url":"https://api.github.com/repos/docker/docker/issues/9759/labels{/name}","comments_url":"https://api.github.com/repos/docker/docker/issues/9759/comments","events_url":"https://api.github.com/repos/docker/docker/issues/9759/events","html_url":"https://github.com/docker/docker/pull/9759","id":52545161,"number":9759,"title":"Proposal: Add the ability to restart a container every X seconds","user":{"login":"ibuildthecloud","id":1754002,"avatar_url":"https://avatars.githubusercontent.com/u/1754002?v=3","gravatar_id":"","url":"https://api.github.com/users/ibuildthecloud","html_url":"https://github.com/ibuildthecloud","followers_url":"https://api.github.com/users/ibuildthecloud/followers","following_url":"https://api.github.com/users/ibuildthecloud/following{/other_user}","gists_url":"https://api.github.com/users/ibuildthecloud/gists{/gist_id}","starred_url":"https://api.github.com/users/ibuildthecloud/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ibuildthecloud/subscriptions","organizations_url":"https://api.github.com/users/ibuildthecloud/orgs","repos_url":"https://api.github.com/users/ibuildthecloud/repos","events_url":"https://api.github.com/users/ibuildthecloud/events{/privacy}","received_events_url":"https://api.github.com/users/ibuildthecloud/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/docker/docker/labels//project/doc","name":"/project/doc","color":"207de5"},{"url":"https://api.github.com/repos/docker/docker/labels/Proposal","name":"Proposal","color":"009800"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":6,"created_at":"2014-12-20T00:53:49Z","updated_at":"2015-02-07T04:18:46Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/docker/docker/pulls/9759","html_url":"https://github.com/docker/docker/pull/9759","diff_url":"https://github.com/docker/docker/pull/9759.diff","patch_url":"https://github.com/docker/docker/pull/9759.patch"},"body":"Currently Docker will sleep 100 * 2^(N-1) milliseconds where N is the number of times it has done a restart.  So this means each restart will sleep twice as long as the last sleep.  So 100 milliseconds, then 200, 400, 800, etc.  The problem is that if you have a container that is failing to start for awhile this sleep time can become hours.  For many things (like a container depending on an external service) it is preferable to just always restart on a fixed interval.  For example, just sleep 2 seconds each time.\r\n\r\nThe syntax for this will be\r\n\r\n`--restart always:2s`\r\n\r\nI know more docs need to change so I just documented the syntax I'm proposing.  I'm sure there will be many opinions so as soon as there is an agreement on the syntax, then I'll update all the docs."},"comment":{"url":"https://api.github.com/repos/docker/docker/issues/comments/73349081","html_url":"https://github.com/docker/docker/pull/9759#issuecomment-73349081","issue_url":"https://api.github.com/repos/docker/docker/issues/9759","id":73349081,"user":{"login":"tiborvass","id":827131,"avatar_url":"https://avatars.githubusercontent.com/u/827131?v=3","gravatar_id":"","url":"https://api.github.com/users/tiborvass","html_url":"https://github.com/tiborvass","followers_url":"https://api.github.com/users/tiborvass/followers","following_url":"https://api.github.com/users/tiborvass/following{/other_user}","gists_url":"https://api.github.com/users/tiborvass/gists{/gist_id}","starred_url":"https://api.github.com/users/tiborvass/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tiborvass/subscriptions","organizations_url":"https://api.github.com/users/tiborvass/orgs","repos_url":"https://api.github.com/users/tiborvass/repos","events_url":"https://api.github.com/users/tiborvass/events{/privacy}","received_events_url":"https://api.github.com/users/tiborvass/received_events","type":"User","site_admin":false},"created_at":"2015-02-07T04:18:46Z","updated_at":"2015-02-07T04:18:46Z","body":"@ibuildthecloud I like this proposal and was in favor of it for some time now. LGTM\r\n\r\nPing @crosbymichael "}}