phusion/phusion-server-tools — pull request #3 by ruphin (2014-05-01 13:09:47+00:00)
Title: Retry webapp check on SocketError

When checking too many webapps, the DNS resolver can randomly overload and throw "Name or service not known" errors. To prevent this, we catch SocketErrors and retry after a 1 second sleep. We notify that the webapp is down if we cannot connect after retrying several times.