title: Error: certificate has expired in Node
body: <p>My production node app on Heroku randomly started throwing the following error:</p>
  
  <pre><code>Error: certificate has expired
       at Error (native)
       at TLSSocket.&lt;anonymous&gt; (_tls_wrap.js:1060:38)
       at emitNone (events.js:86:13)
       at TLSSocket.emit (events.js:185:7)
       at TLSSocket._finishInit (_tls_wrap.js:584:8)
       at TLSWrap.ssl.onhandshakedone (_tls_wrap.js:416:38)
   error: Forever detected script exited with code: 1
   error: Script restart attempt #1
   Creating a pool connected to blah.thing.com:port
   Running migrations for database 'app_name'...
   events.js:160
         throw er; // Unhandled 'error' event
         ^
  </code></pre>
  
  <p>I'm confused by two things. My certificate is up to date, so I don't know why it's saying it's expired, and second, the only two files called "events.js" in my app directory are in two seemingly irrelevant node modules (inquirer and twilio) and don't even have a line 160. What might be the cause of this and how should I even debug it?</p>
  
  <p>edit: In addition, it's just the production app (of course), not staging or local, which is odd because staging and production both point to the same certificate.</p>