Deadlock in postgresql

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
User avatar
tgriep
Madmin
Posts: 9190
Joined: Thu Oct 30, 2014 9:02 am

Re: Deadlock in postgresql

Post by tgriep »

There may be a stuck Nagios process that is holding the postgres database causing the deadlock error.

Lets stop the Nagios and postgres daemons by logging to the server as root and running the following

Code: Select all

service nagios stop
killall -9 nagios
service postgresql stop
Next, lets start the postgres database and vacuum it by running the following.

Code: Select all

service postgresql start
echo "vacuum;vacuum analyze;vacuum full;"|psql nagiosxi postgres
service postgresql restart
Now startup the Nagios daemon and see if that resolved the issue.

Code: Select all

service nagios start
Be sure to check out our Knowledgebase for helpful articles and solutions!
Locked