postmaster dead but pid file exists

╄→гoц情女王★ 提交于 2019-12-12 03:18:48

问题


We have a rails 4 application with postgres

Sometimes our server hanged and if we reboot it .

The server gets started but it can not connect to postgres.

status shows postmaster dead but pid file exists

log shows

FATAL:  lock file "/tmp/.s.PGSQL.5432.lock" already exists
HINT:  Is another postmaster (PID 4696) using socket file "/tmp/.s.PGSQL.5432"?
LOG:  could not bind IPv4 socket: Address already in use

and the postgresql could not restarted.

--- After deleting the /tmp/.s.PGSQL.5432 file and restarting the postgres service the service restarted but the postgres can not connect with host we added.

What can we do to fix this issue ?

Thanks in advance

来源:https://stackoverflow.com/questions/31546303/postmaster-dead-but-pid-file-exists

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!