title: How long should a mysql connection live in golang
body: <p>I am using mysql with golang and reading this <a href="http://go-database-sql.org/accessing.html" rel="noreferrer">doc</a>. It says</p>
  
  <blockquote>
    <p>Although it’s idiomatic to Close() the database when you’re finished with it, the sql.DB object is designed to be long-lived. Don’t Open() and Close() databases frequently. </p>
  </blockquote>
  
  <p>I don't know how long should the connnection be. For now, I open the connection each http request if necessary. Is it too frequently?</p>