Well, there we go. The server log shows these last entries and then there isn't anything else:
2018-07-23 17:44:14 https://src.dot-eth0.sh/scripts/pythonanywhere/renew-letsencrypt.sh -> https://gitlab.com/ethernet.zero/scripts-public/raw/master/pythonanywhere/renew-letsencrypt.sh
2018-07-23 17:46:54 https://src.dot-eth0.sh/scripts/pythonanywhere/renew-letsencrypt.sh -> https://gitlab.com/ethernet.zero/scripts-public/raw/master/pythonanywhere/renew-letsencrypt.sh
2018-07-24 00:13:48 ...brutally killing workers...
2018-07-24 00:13:53 Tue Jul 24 00:13:53 2018 - received message 0 from emperor
2018-07-24 00:14:35 uwsgi_master_manage_emperor()/read(): Bad file descriptor [core/emperor.c line 2427]
2018-07-24 00:14:35 lost connection with my emperor !!!
2018-07-24 00:14:35 chdir(): No such file or directory [core/uwsgi.c line 1590]
2018-07-24 00:14:35 VACUUM: unix socket /var/sockets/src.dot-eth0.sh/socket removed.
And sure enough, making a request to my web app redirects to https://localhost/:
$ curl -si https://src.dot-eth0.sh/scripts/pythonanywhere/renew-letsencrypt.sh
HTTP/1.1 301 Moved Permanently
Server: openresty/1.9.15.1
Date: Tue, 24 Jul 2018 07:00:04 GMT
Content-Type: text/html
Content-Length: 191
Connection: keep-alive
Location: https://localhost/
X-Clacks-Overhead: GNU Terry Pratchett
<html>
<head><title>301 Moved Permanently</title></head>
<body bgcolor="white">
<center><h1>301 Moved Permanently</h1></center>
<hr><center>openresty/1.9.15.1</center>
</body>
</html>
But now something weird happened: I made a request to a nonexistent URL and the server returned this response:
$ curl -si https://src.dot-eth0.sh/doesnt/matter/what/i/put/here
HTTP/1.1 302 Found
Server: openresty/1.9.15.1
Date: Tue, 24 Jul 2018 07:05:05 GMT
Content-Type: text/html; charset=utf-8
Transfer-Encoding: chunked
Connection: keep-alive
Vary: Cookie
X-Frame-Options: SAMEORIGIN
Location: https://src.dot-eth0.sh/doesnt/matter/what/i/put/here
Set-Cookie: sessionid=l4auaq5t80p3pz7o7pk1y7ua64vgswxr; expires=Tue, 07-Aug-2018 07:05:05 GMT; httponly; Max-Age=1209600; Path=/
X-Clacks-Overhead: GNU Terry Pratchett
(Note that here it's trying to redirect to itself)
And right after that, everything is back to normal except for absolutely nothing being written to the logs:
$ curl -si https://src.dot-eth0.sh/doesnt/matter/what/i/put/here
HTTP/1.1 404 Not Found
Server: openresty/1.9.15.1
Date: Tue, 24 Jul 2018 07:05:59 GMT
Content-Type: text/html; charset=UTF-8
Content-Length: 780
Connection: keep-alive
Vary: Accept-Encoding
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html>
<head>
<title>Error: 404 Not Found</title>
<style type="text/css">
html {background-color: #eee; font-family: sans;}
body {background-color: #fff; border: 1px solid #ddd;
padding: 15px; margin: 15px;}
pre {background-color: #eee; border: 1px solid #ddd; padding: 5px;}
</style>
</head>
<body>
<h1>Error: 404 Not Found</h1>
<p>Sorry, the requested URL <tt>'https://src.dot-eth0.sh/doesnt/matter/what/i/put/here'</tt>
caused an error:</p>
<pre>Not found: '/doesnt/matter/what/i/put/here'</pre>
</body>
</html>
(Notice also that this is exactly the same request as above and it now returns a correct 404 response)
$ curl -si https://src.dot-eth0.sh/scripts/pythonanywhere/renew-letsencrypt.sh
HTTP/1.1 302 Found
Server: openresty/1.9.15.1
Date: Tue, 24 Jul 2018 07:06:08 GMT
Content-Type: text/html; charset=UTF-8
Content-Length: 0
Connection: keep-alive
Location: https://gitlab.com/ethernet.zero/scripts-public/raw/master/pythonanywhere/renew-letsencrypt.sh
X-Clacks-Overhead: GNU Terry Pratchett
Now that's a really weird and unstable behavior. Does any of this ring a bell?