Welcome Guest, Not a member yet? Register   Sign In
Unable to connect to your database server using the provided settings.
#1

[eluser]SPeed_FANat1c[/eluser]
Hello,

I was getting this message, but my settings were not changed. I could not understand what is that - I copied settings from coworker and for him they works, for me not.

Later decided to try to add in database.php

Code:
$dbconn4 = pg_connect($conn_string);
and connect with those. It worked. I remove this line, then it still works, but later again does not work. So I decided to leave this line, because it magically solves the problem.

And once I get error again, but this time even this line gets error:

Quote:A PHP Error was encountered

Severity: Warning

Message: pg_connect() [function.pg-connect]: Unable to connect to PostgreSQL server: FATAL: remaining connection slots are reserved for non-replication superuser connections

Filename: config/database.php

Line Number: 79

A Database Error Occurred

Unable to connect to your database server using the provided settings.

Filename: D:\projektai\glab\system\database\DB_driver.php

Line Number: 124

The first one is much more informational - this is something with slots. Why don't I see it in codeigniter error message? Do I need to turn some error showing or something? And if not, I would suggest to add such error showing, because its not good when you cannot see what exactly is not working Sad
#2

[eluser]Hockeychap[/eluser]
Evening,

This is a Postgres issue usually relating the number of existing vs utilised connections. It sounds like you're not closing your connections to the database correctly and are running up agains the the number of max_connections.

First step would be to make sure the connections are being closed and then if necessary up the max_connections count. Unfortunately (from memory) PHP doesn't support connection pooling for postgres connectivity (which would be the best solution).

There's some information available Postgress Wiki re Connections

HTH,
Justin
#3

[eluser]SPeed_FANat1c[/eluser]
thanks. Maybe you know is there some setting in codeigniter where I could see better error messages from database withouth having to use plain PHP?
#4

[eluser]Hockeychap[/eluser]
Sorry - been away on business.

'fraid I can't help with that as I tend not to use the acrive record helper and do my own error trapping.


Justin




Theme © iAndrew 2016 - Forum software by © MyBB