{"action":"created","issue":{"url":"https://api.github.com/repos/QubitProducts/bamboo/issues/79","labels_url":"https://api.github.com/repos/QubitProducts/bamboo/issues/79/labels{/name}","comments_url":"https://api.github.com/repos/QubitProducts/bamboo/issues/79/comments","events_url":"https://api.github.com/repos/QubitProducts/bamboo/issues/79/events","html_url":"https://github.com/QubitProducts/bamboo/issues/79","id":57171837,"number":79,"title":"default haproxy ReloadCommand locks up","user":{"login":"c089","id":327199,"avatar_url":"https://avatars.githubusercontent.com/u/327199?v=3","gravatar_id":"","url":"https://api.github.com/users/c089","html_url":"https://github.com/c089","followers_url":"https://api.github.com/users/c089/followers","following_url":"https://api.github.com/users/c089/following{/other_user}","gists_url":"https://api.github.com/users/c089/gists{/gist_id}","starred_url":"https://api.github.com/users/c089/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/c089/subscriptions","organizations_url":"https://api.github.com/users/c089/orgs","repos_url":"https://api.github.com/users/c089/repos","events_url":"https://api.github.com/users/c089/events{/privacy}","received_events_url":"https://api.github.com/users/c089/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-02-10T13:04:20Z","updated_at":"2015-02-10T15:25:36Z","closed_at":null,"body":"The haproxy reload script frequently locks up, prevent config updates for haproxy. I found two related commits: https://github.com/QubitProducts/bamboo/commit/3bf7fd5864af540fe760a558abfca5f509cd0e80 https://github.com/QubitProducts/bamboo/commit/d1d3b6588bdc0a8ea08759dd0ca05fa908d215e2\r\n\r\nNote how the second one changes from reading the PID file to using `pidof`. On our server where the reload hangs, `pidof` reports two running haproxy processes, while there is only one PID in the file - which seems to be the issue mentioned by @sttts in the first commit. The existence of the extra PID, in combination with the `while` loop from the first commit causes updates to hang: While haproxy reloads sucessfully, the `while` will never terminate, so further updates will not trigger reloads anymore.\r\n\r\n```\r\n$ cat /var/run/haproxy.pid\r\n25296\r\n$ pidof haproxy\r\n25296 22555\r\n```\r\n\r\n```\r\n$ ps aux|grep haproxy\r\nhaproxy  22555  0.0  0.1  30512  3072 ?        Ss   09:27   0:01 haproxy -f /etc/haproxy/haproxy.cfg -p /var/run/haproxy.pid -sf 22492\r\n1000     22707  0.0  0.0   9356   644 pts/2    R+   13:57   0:00 grep --color=auto haproxy\r\nroot     25293  0.3  0.0   4400   636 ?        S    10:34   0:41 sh -c PIDS=`pidof haproxy`; haproxy -f /etc/haproxy/haproxy.cfg -p /var/run/haproxy.pid -sf $PIDS && while ps -p $PIDS; do sleep 0.2; done\r\nhaproxy  25296  0.0  0.1  30696  3072 ?        Ss   10:34   0:02 haproxy -f /etc/haproxy/haproxy.cfg -p /var/run/haproxy.pid -sf 22555\r\n```\r\n\r\nI wonder why the production.example.json was updated in that second commit (cc @activars): to me, it seems that reading the PIDs from the PID file is the correct way."},"comment":{"url":"https://api.github.com/repos/QubitProducts/bamboo/issues/comments/73717871","html_url":"https://github.com/QubitProducts/bamboo/issues/79#issuecomment-73717871","issue_url":"https://api.github.com/repos/QubitProducts/bamboo/issues/79","id":73717871,"user":{"login":"c089","id":327199,"avatar_url":"https://avatars.githubusercontent.com/u/327199?v=3","gravatar_id":"","url":"https://api.github.com/users/c089","html_url":"https://github.com/c089","followers_url":"https://api.github.com/users/c089/followers","following_url":"https://api.github.com/users/c089/following{/other_user}","gists_url":"https://api.github.com/users/c089/gists{/gist_id}","starred_url":"https://api.github.com/users/c089/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/c089/subscriptions","organizations_url":"https://api.github.com/users/c089/orgs","repos_url":"https://api.github.com/users/c089/repos","events_url":"https://api.github.com/users/c089/events{/privacy}","received_events_url":"https://api.github.com/users/c089/received_events","type":"User","site_admin":false},"created_at":"2015-02-10T15:25:36Z","updated_at":"2015-02-10T15:25:36Z","body":"...and it's back, with current bamboo master"}}