postgresql - Postgres stops listening on IP (Azure) / rails -


i have postgres 9.3.9 running on azure. have rails webserver connecting it.

i can connect fine rails server while. connect this:

me@server:~$ psql -h db.mydomain.com -u myuser mydb 

then while later (30 mins, or hours - it's random) can't connect anymore , need restart server (/etc/init.d/postgresql restart) able connect again.

when stops responding, can't telnet port 5432 - not respond.

this psql:

me@server:~$ psql -h db.mydomain.com -u myuser mydb psql: not connect server: connection timed out     server running on host "db.mydomain.com" (x.x.x.x) , accepting     tcp/ip connections on port 5432? 

this capistrano deploy:

initialize': not connect server: connection timed out (pg::connectionbad)  ** [out :: x.x.x.x] server running on host "db.mydomain.com" (x.x.x.x) , accepting  ** [out :: x.x.xx] tcp/ip connections on port 5432? 

other points:

  • when stops responding, rails web app still works ok browser
  • as restart postgresql server accepts connection
  • it intermittent, if isn't responding , leave while (10 minutes? hours?) might work next time


Comments

Popular posts from this blog

dns - How To Use Custom Nameserver On Free Cloudflare? -

python - Pygame screen.blit not working -

c# - Web API response xml language -