Download failed.: Could not resolve host: downloads.wordpress.org

I just ran into this problem when trying to use the Auto Update feature of WordPress.

I could Ping from the server’s terminal to downloads.wordpress.org without problems, but the WordPress app could not.

I resolved it by restarting the PHP service, it looks like it had stale DNS records and they’ve been changed at OS level by my VPS provider so a restart forced the update of them and got it to work.