I am running my rails 4 application with Postgres db, sometime my db connection getting lost with the below exception
PG::ConnectionBad: PQconsumeInput() server closed the connection unexpectedly
This probably means the server terminated abnormally
before or while processing the request.
And the connection is resuming properly after I restart the application, is their anyway to automatically reconnect to active record connection?