Open NewStorm-0 opened 2 years ago
偶爾會發生 502 Bad Gateway
<html>
<head><title>502 Bad Gateway</title></head>
<body bgcolor="white">
<center><h1>502 Bad Gateway</h1></center>
<hr><center>nginx/1.14.0 (Ubuntu)</center>
</body>
</html>
我的解決方式,最後在清除掉多餘的錯誤
0 */1 * * * /usr/bin/sed -i "/# GitHub520 Host Start/Q" /etc/hosts && curl https://raw.hellogithub.com/hosts >> /etc/hosts && /usr/bin/sed -i "/<html>/, /<\/html>/d" /etc/hosts
我这边测试发现用 curl 会有类似的问题,后面改用 wget 后没有了 我在 systemd 中增加两个下载地址,也是防止主连接挂掉后无法更新,可以通过第二个连接获取更新。https://github.com/521xueweihan/GitHub520/pull/212
大家有没有遇到类似的问题呢