I have OpenSSL/1.0.2k and got a similar message (Could not resolve host: cdn.richeyweb.com or Error 504 - Gateway Timeout
The gateway did not receive a timely response from the upstream server or application.) on 3 different Joomla sites. Disabling both geoip plugins in phpmyadmin temporary fixed mentioned issue.
Enabling it again, an issue remains.
Strange for me is a fact, that I have about 10 Joomla sites hosted on same server (everything updated), but I got error on only 3 sites.
Today I have this issue also. There is newest OPENSSL version on the server (I checked it with provider). I tried to turn off plugins in phpAdmin as advised in the other post (plg_system_eprivacygeoip and plg_system_geoip) in phpmyadmin). Can't found plg_system_eprivacygeoip in extensions table. Any advise, please?