FATAL: Peer authentication failed for user - (PG::ConnectionBad)

Having a Strange Issue. Deploying a Rails 5 App on Ruby 2.3.1

With

config.eager_load = true #in production.rb

When I try starting Unicorn with

bundle exec unicorn -D -c /home/deploy/apps/cgrates_web_production/shared/config/unicorn.rb -E production

I get this error

FATAL: Peer authentication failed for user "demo" (PG::ConnectionBad) #in unicorn.log

If I set

config.eager_load = false #in production.rb

everything works as expected. Unicorn Starts up and i can access the
Application and perform CRUD Operations.

Any Help would be highly appreciated

config.eager_load= true in development purpose to speedup the files loading.
It does not require in production mode.

example in development, requested any page it will get loaded. if I change the code from model or controller and request the same page or page related to code changes made. It takes time. To overcome this problem in development require config.eager_load= true.
Hope this well help.

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs