January 5th, 2010, 09:41 AM
I have been developing a Drupal web site which connects to postgres and on my development environment everything works fine.
Now that i am deploying to our servers i am experimenting some connection timeouts from time to time, that result in setting my site offline for a few minutes.
the error i get is the following one:
The*pgsql*error was:*pg_connect() [<a href='function.pg-connect'>function.pg-connect</a>]: Unable to connect to PostgreSQL server: could not connect to server: Connection timed out Is the server running on host "sql1.gss3.com" and accepting TCP/IP connections on port 5432?.
drupal is running on a Ubuntu 9.10 server with IP 22.214.171.124 and postgres at 126.96.36.199.
when the site goes offline, i can still access postgres using pgAdminIII and Webmin also connects to the DB without problem...
any idea of what might be causing this?
Is there any special parameter(s) in the postgres config files that i should check/change?
any help is welcome!
thanks in advance!
January 10th, 2010, 04:50 PM
problem solved, in case someone runs into something similar,
this had nothing to do with postgres, it was a problem with our DNS, switching to the real IP instead of domain name in the connection did the trick.