On Thu, Sep 13, 2018 at 7:05 PM Chris Williams <cswilliams@xxxxxxxxx> wrote:
We just have a few ruby on rails applications connected to the database, and don't really have any long running or heavy queries and the db is under very light load, so I don't understand why it takes so long to shutdown. We do have a sizeable number of connections though (about 600) and there are two replicas connected to it. I also tried setting idle_in_transaction_session_timeout to 300 seconds to see if that would help, but it made no difference.
If you only have a few rails apps connected to the DB and a very light load, may be you can try reducing the number of connections (how big are your connection pools?) and see if that helps. 600 seems to be a big value for just a few apps and a light load.