title: openshift received smart shutdown request
body: <p>I unexpectedly got 500 Internal Server Error and I do not know why. My error logs:</p>
  
  <p>postgresql.log:</p>
  
  <pre><code>2015-05-02 12:47:23 GMT LOG:  received smart shutdown request
  2015-05-02 12:47:33 GMT FATAL:  the database system is shutting down
  2015-05-02 12:48:00 GMT FATAL:  the database system is shutting down
  2015-05-02 12:48:04 GMT FATAL:  the database system is shutting down
  2015-05-02 12:48:04 GMT FATAL:  the database system is shutting down
  2015-05-02 12:48:05 GMT FATAL:  the database system is shutting down
  2015-05-02 12:49:07 GMT LOG:  shutting down
  2015-05-02 12:49:07 GMT LOG:  database system is shut down
  2015-05-02 12:49:11 GMT LOG:  could not bind socket for statistics collector: Permission denied
  2015-05-02 12:49:11 GMT LOG:  trying another address for the statistics collector
  2015-05-02 12:49:11 GMT LOG:  could not bind socket for statistics collector: Cannot assign requested address
  2015-05-02 12:49:11 GMT LOG:  disabling statistics collector for lack of working socket
  2015-05-02 12:49:11 GMT WARNING:  autovacuum not started because of misconfiguration
  2015-05-02 12:49:11 GMT HINT:  Enable the "track_counts" option.
  2015-05-02 12:49:11 GMT LOG:  database system was shut down at 2015-05-02 12:49:07 GMT
  2015-05-02 12:49:11 GMT LOG:  database system is ready to accept connections
  2015-05-02 12:50:04 GMT LOG:  could not receive data from client: Connection reset by peer
  2015-05-02 12:50:04 GMT LOG:  could not receive data from client: Connection reset by peer   
  </code></pre>
  
  <p>python.log: </p>
  
  <pre><code>- - - [02/May/2015:08:49:02 -0400] "OPTIONS * HTTP/1.0" 200 - "-" "Apache/2.2.15 (Red Hat) (internal dummy connection)"
  [Sat May 02 08:49:04 2015] [error] [client 127.5.19.129] Script timed out before returning headers: application
  82.29.167.9 - - [02/May/2015:08:48:59 -0400] "GET /stream/ HTTP/1.1" 500 621 "-" "Mozilla/5.0 (Windows NT 6.1; rv:37.0) Gecko/20100101 Firefox/37.0"
  - - - [02/May/2015:08:49:04 -0400] "OPTIONS * HTTP/1.0" 200 - "-" "Apache/2.2.15 (Red Hat) (internal dummy connection)"
  </code></pre>