Postgres Backend Connections is WARNING

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
TBT
Posts: 625
Joined: Wed May 18, 2011 1:26 pm

Postgres Backend Connections is WARNING

Post by TBT »

We've been seeing more of these lately: "POSTGRES_BACKENDS WARNING: (host:127.0.0.1) 76 of 100 connections (76%)".

What typically is the cause? What more can I do to investigate?
Nagios XI 2024R2.2.1 (8 Servers)
Nagios Fusion 2024R1.0.2
rkennedy
Posts: 6579
Joined: Mon Oct 05, 2015 11:45 am

Re: Postgres Backend Connections is WARNING

Post by rkennedy »

How many hosts / services do you have running in XI? This could just be growing as you add additional services with time.
Former Nagios Employee
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: Postgres Backend Connections is WARNING

Post by lmiltchev »

Where do you see this? In the logs? Is this a check that you are running? Can you show us the config?

I would guess that you are still using the "default" setting of 100 max connections in the postgresql.conf:

Code: Select all

max_connections = 100
You could bump up this value a bit, and restart postgres so that changes can take effect.

Code: Select all

service postgresql restart
Be sure to check out our Knowledgebase for helpful articles and solutions!
TBT
Posts: 625
Joined: Wed May 18, 2011 1:26 pm

Re: Postgres Backend Connections is WARNING

Post by TBT »

rkennedy wrote:How many hosts / services do you have running in XI? This could just be growing as you add additional services with time.
As mentioned, this is occurring on several of our XI servers. One for example has 146 Hosts and 1916 Services. Certainly nothing near the limitations of XI.
Nagios XI 2024R2.2.1 (8 Servers)
Nagios Fusion 2024R1.0.2
TBT
Posts: 625
Joined: Wed May 18, 2011 1:26 pm

Re: Postgres Backend Connections is WARNING

Post by TBT »

lmiltchev wrote:Where do you see this? In the logs? Is this a check that you are running? Can you show us the config?

I would guess that you are still using the "default" setting of 100 max connections in the postgresql.conf:

Code: Select all

max_connections = 100
You could bump up this value a bit, and restart postgres so that changes can take effect.

Code: Select all

service postgresql restart
- We receive the Service Alerts via email.
- We put these DB checks in place, with a 75% warning and 90% critical alarm.
- The /var/lib/pgsql/data/postgresql.conf has not been modified and currently contains "max_connections = 100"
Nagios XI 2024R2.2.1 (8 Servers)
Nagios Fusion 2024R1.0.2
rkennedy
Posts: 6579
Joined: Mon Oct 05, 2015 11:45 am

Re: Postgres Backend Connections is WARNING

Post by rkennedy »

TBT wrote:
lmiltchev wrote:Where do you see this? In the logs? Is this a check that you are running? Can you show us the config?

I would guess that you are still using the "default" setting of 100 max connections in the postgresql.conf:

Code: Select all

max_connections = 100
You could bump up this value a bit, and restart postgres so that changes can take effect.

Code: Select all

service postgresql restart
- We receive the Service Alerts via email.
- We put these DB checks in place, with a 75% warning and 90% critical alarm.
- The /var/lib/pgsql/data/postgresql.conf has not been modified and currently contains "max_connections = 100"
I would adjust your warning / critical value accordingly and also raise the max_connections to say, 200. You shouldn't see any issues with doing this.

Looking at an idle XI box, I have 78 connections running currently to SQL, so I don't think this is of any alarm.

Code: Select all

[root@localhost ~]# mysql -uroot -pnagiosxi -e "SHOW PROCESSLIST;" | wc -l
78
Former Nagios Employee
TBT
Posts: 625
Joined: Wed May 18, 2011 1:26 pm

Re: Postgres Backend Connections is WARNING

Post by TBT »

We'll make the suggested adjustments and report back if the issue remains.

Thank you,
Nagios XI 2024R2.2.1 (8 Servers)
Nagios Fusion 2024R1.0.2
rkennedy
Posts: 6579
Joined: Mon Oct 05, 2015 11:45 am

Re: Postgres Backend Connections is WARNING

Post by rkennedy »

Sounds good - I'll leave this open should any issues arise.
Former Nagios Employee
Locked