RAILS - How to automatically connect to pg db

I run my rails 4 application with Postgres db, once my db connection is lost with the description below

PG::ConnectionBad: PQconsumeInput() server closed the connection unexpectedly This probably means the server terminated abnormally before or while processing the request. 

And the connection resumes properly after restarting the application, anyway, so that they automatically connect to the active record connection?

+6
source share

Source: https://habr.com/ru/post/982493/


All Articles