Postgres Startup Issues

I recently switched to Postgres and get intermittent form errors:

PGError: FATAL:  terminating connection due to administrator command
SSL connection has been closed unexpectedly: 
        SELECT a.attname, format_type(a.atttypid, a.atttypmod), 
               d.adsrc, a.attnotnull
          FROM pg_attribute a LEFT JOIN pg_attrdef d
            ON a.attrelid = d.adrelid AND a.attnum = d.adnum
         WHERE a.attrelid = '"xxxxxx"'::regclass
           AND a.attnum > 0 AND NOT a.attisdropped
         ORDER BY a.attnum

vendor/bundle/ruby/1.9.1/gems/activerecord-3.0.11/lib/active_record/
connection_adapters/postgresql_adapter.rb:505:in `exec'

What can I do to get around this (besides returning to the old Addgres Addon, which is a workaround, I suppose).

+5
source share
1 answer

Ideally, your application should transparently deal with database errors by re-viewing its work without trying to disconnect the user. If the backend of an idle database is closed from under it, it doesn’t matter to him, he just has to create a new connection and start the transaction again. I do not know how Rails and ActiveRecord do this.

See also the question . What is the reason “PGError: FATAL: connection termination due to administrator command” on the hero? .

, Heroku , , , .

+5

All Articles