Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Shaun E on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

DBI error in logs

Status
Not open for further replies.

MrCBofBCinTX

Technical User
Dec 24, 2003
164
US
I am occasionally getting errors like this in Apache 1.3 log
This is using Apache::DBI and mod_perl
Each appears about 20 times.

What does this error signify? Something I need to fix or just ignore?

[Wed Sep 16 19:14:52 2009] [error] DBI connect('dbname=DB12;host=127.0.0.1;port=5432','user12',...) failed: FATAL: sorry, too many clients already at /usr/local/libdata/perl5/site_perl/Apache/DBI.pm line 146\n
[Wed Sep 16 19:14:52 2009] [error] DBI connect('dbname=DB12;host=127.0.0.1;port=5432','user12',...) failed: FATAL: connection limit exceeded for non-superusers at /usr/local/libdata/perl5/site_perl/Apache/DBI.pm line 146\n
 
Presumably your database has a tuning parameter controlling the maximum number of connections... I'd investigate whether this is being hit, and if so, why? Possibly stale connections not being closed properly or something? If it's genuine workload then you may just need to increase the parameter.

Annihilannic.
 
No, its definitely not genuine workload.

As I understand, with Apache::DBI, connections remain open, and cached until child terminated.
( I get 10 database connections opened, one for each child normally spawned by apache, this is what I want to have happen)
I was just reading a bit yesterday that there are ways to break bad connections rather than terminating a child early.

But I'm pretty clueless how to get the details of what's happening here
 
Apache will start more than 10 children if it gets busy though, could that be what's happening? How busy is the site at the times the problem occurs?

Are there any messages in the database logs at the times the connections are refused?

Annihilannic.
 
Yes, just normal busy times. I had a bunch of regular web connections, thus extra children.

I raised connections for postgresql.
Good to realize nothing seriously wrong.

Thanks, I didn't think of that obvious server busy idea.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top