title: intermittent "connection reset by peer" sql postgres
body: <p>After a period of inactivity, my go web service is getting a <code>net.OpError</code> with message <code>read tcp x.x.x.x:52086-&gt;x.x.x.x:24414: read: connection reset by peer</code> when executing the first postgres sql query. After the error, the subsequent requests will work fine.</p>
  
  <p>The postgres database is hosted with compose.com which has haproxy in front of the postgres db. My go web app is using standard sql and sqlx.</p>
  
  <p>I've tried running a ticker invoking <code>db.Ping()</code> every 15 minutes, but this hasn't fixed the issue.</p>
  
  <p>Why is the go standard <code>sql</code> lib not handling these connection drops?</p>