Message: A database connection error has been detected, we are attempting to repair the server, if the repair does not resolve the issue, please contact Nagios support.
Run the following from the CLI as root to attempt to repair the DB
/usr/local/nagiosxi/scripts/repair_databases.sh
Tried running this script, no change. Also tried restarting both the database and nagiosxi servers
output from /var/log/httpd/error_log
[Sun Jul 12 14:59:27 2015] [error] [client 10.x.x.x] PHP Warning: pg_pconnect(): Unable to connect to PostgreSQL server: FATAL: connection limit exceeded for non-superusers in /usr/local/nagiosxi/html/db/adodb/drivers/adodb-postgres64.inc.php on line 682, referer: http://nagiosxi.address.com/nagiosxi/
[Sun Jul 12 14:59:27 2015] [error] [client 10.x.x.x] PHP Notice: Undefined variable: result in /usr/local/nagiosxi/html/includes/db.inc.php on line 241, referer: http://nagiosxi.address.com/nagiosxi/
A database connection error has been detected
- Box293
- Too Basu
- Posts: 5126
- Joined: Sun Feb 07, 2010 10:55 pm
- Location: Deniliquin, Australia
- Contact:
Re: A database connection error has been detected
Is postgresql running?
The logs are named by the day, , for example postgresql-Mon.log
Can you please run this command for the most recent log:
And also:
Post the results here in a code block.
Code: Select all
service postgresql statusCan you please run this command for the most recent log:
Code: Select all
tail -n 100 /var/lib/pgsql/data/pg_log/postgresql-Mon.logCode: Select all
tail /var/log/messages -n 100As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
Re: A database connection error has been detected
Was this ever resolved? I'm actually having the same issue.
Re: A database connection error has been detected
I think that is a question that only the original author of the topic can answer.
Have these steps been done?
Have these steps been done?
Box293 wrote:Is postgresql running?
The logs are named by the day, , for example postgresql-Mon.logCode: Select all
service postgresql status
Can you please run this command for the most recent log:
And also:Code: Select all
tail -n 100 /var/lib/pgsql/data/pg_log/postgresql-Mon.log
Post the results here in a code block.Code: Select all
tail /var/log/messages -n 100
Former Nagios Employee.
me.
me.
Re: A database connection error has been detected
# service postgresql status
postmaster (pid 1914) is running...
# tail -n 100 /var/lib/pgsql/data/pg_log/postgresql-Mon.log
FATAL: connection limit exceeded for non-superusers
FATAL: connection limit exceeded for non-superusers
FATAL: connection limit exceeded for non-superusers
FATAL: connection limit exceeded for non-superusers
FATAL: connection limit exceeded for non-superusers
FATAL: connection limit exceeded for non-superusers
FATAL: connection limit exceeded for non-superusers
FATAL: connection limit exceeded for non-superusers
postmaster (pid 1914) is running...
# tail -n 100 /var/lib/pgsql/data/pg_log/postgresql-Mon.log
FATAL: connection limit exceeded for non-superusers
FATAL: connection limit exceeded for non-superusers
FATAL: connection limit exceeded for non-superusers
FATAL: connection limit exceeded for non-superusers
FATAL: connection limit exceeded for non-superusers
FATAL: connection limit exceeded for non-superusers
FATAL: connection limit exceeded for non-superusers
FATAL: connection limit exceeded for non-superusers
Re: A database connection error has been detected
Have you tried increasing the default "max_connections" value of 100 in the "/var/lib/pgsql/data/postgresql.conf", i.e.
and restarting the posgresql?
Code: Select all
max_connections = 200Code: Select all
service postgresql restartBe sure to check out our Knowledgebase for helpful articles and solutions!
Re: A database connection error has been detected
I did some research on the error message after I posted the results and found I could increase the limit. I have done so only a few minutes ago. I haven't seen any DB Connection errors since but it may be too early to tell.
-
jdalrymple
- Skynet Drone
- Posts: 2620
- Joined: Wed Feb 11, 2015 1:56 pm
Re: A database connection error has been detected
We'll leave the ticket open. Reach back out if the problem recurs.