Skip to content

Instantly share code, notes, and snippets.

@ahey
Created January 18, 2020 00:00
Show Gist options
  • Save ahey/8dab2f6614f5490996934150564359e8 to your computer and use it in GitHub Desktop.
Save ahey/8dab2f6614f5490996934150564359e8 to your computer and use it in GitHub Desktop.
Detecting when a heroku application is down for maintenance
curl -v 'https://stormy-lake-09991.herokuapp.com/' -H 'Content-Type: application/json' -H 'Accept: application/json' -H 'Connection: keep-alive' -H 'Pragma: no-cache' -H 'Cache-Control: no-cache'
* Trying 34.197.140.84...
* TCP_NODELAY set
* Connected to stormy-lake-09991.herokuapp.com (34.197.140.84) port 443 (#0)
* ALPN, offering h2
* ALPN, offering http/1.1
* successfully set certificate verify locations:
* CAfile: /etc/ssl/cert.pem
CApath: none
* TLSv1.2 (OUT), TLS handshake, Client hello (1):
* TLSv1.2 (IN), TLS handshake, Server hello (2):
* TLSv1.2 (IN), TLS handshake, Certificate (11):
* TLSv1.2 (IN), TLS handshake, Server key exchange (12):
* TLSv1.2 (IN), TLS handshake, Server finished (14):
* TLSv1.2 (OUT), TLS handshake, Client key exchange (16):
* TLSv1.2 (OUT), TLS change cipher, Change cipher spec (1):
* TLSv1.2 (OUT), TLS handshake, Finished (20):
* TLSv1.2 (IN), TLS change cipher, Change cipher spec (1):
* TLSv1.2 (IN), TLS handshake, Finished (20):
* SSL connection using TLSv1.2 / ECDHE-RSA-AES128-GCM-SHA256
* ALPN, server did not agree to a protocol
* Server certificate:
* subject: C=US; ST=California; L=San Francisco; O=Heroku, Inc.; CN=*.herokuapp.com
* start date: Apr 19 00:00:00 2017 GMT
* expire date: Jun 22 12:00:00 2020 GMT
* subjectAltName: host "stormy-lake-09991.herokuapp.com" matched cert's "*.herokuapp.com"
* issuer: C=US; O=DigiCert Inc; OU=www.digicert.com; CN=DigiCert SHA2 High Assurance Server CA
* SSL certificate verify ok.
> GET / HTTP/1.1
> Host: stormy-lake-09991.herokuapp.com
> User-Agent: curl/7.64.1
> Content-Type: application/json
> Accept: application/json
> Pragma: no-cache
> Cache-Control: no-cache
>
< HTTP/1.1 503 Service Unavailable
< Connection: keep-alive
< Server: Cowboy
< Date: Fri, 17 Jan 2020 23:59:42 GMT
< Content-Length: 511
< Content-Type: text/html; charset=utf-8
< Cache-Control: no-cache, no-store
<
<!DOCTYPE html>
<html>
<head>
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta charset="utf-8">
<title>Offline for Maintenance</title>
<style media="screen">
html,body,iframe {
margin: 0;
padding: 0;
}
html,body {
height: 100%;
overflow: hidden;
}
iframe {
width: 100%;
height: 100%;
border: 0;
}
</style>
</head>
<body>
<iframe src="//www.herokucdn.com/error-pages/maintenance-mode.html"></iframe>
</body>
* Connection #0 to host stormy-lake-09991.herokuapp.com left intact
</html>* Closing connection 0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment