When using Ruby Gem pg
and establish database connections to a PostgreSQL database, you’ll see PG errors when the database connection becomes problematic. In my experience, two typical PG errors are PG::AdminShutdown
and PG::UnableToSend
.
Error PG::AdminShutdown
The error message contains the following information:
FATAL: terminating connection due to administrator command (PG::AdminShutdown) server closed the connection unexpectedly
This probably means the server terminated abnormally
before or while processing the request.