tags:

views:

94

answers:

1

Hi all,

Once in a while I am facing this error's in Postgres.

  1. org.postgresql.util.PSQLException: Connection refused. Check that the hostname and port are correct and that the postmaster is accepting TCP/IP connections.

    and

  2. org.postgresql.util.PSQLException: FATAL: sorry, too many clients already

    My database will work when i restart the server after getting this error.

help me.

regards, Mahesh

A: 

You could post more about your setup - language and libraries (I suppose it's Java and JDBC), server version, what's its purpose (development or production) etc.

The second error you get is very clear - you exceed the configured number of connections to the server. Check the "max_connections" parameter in the server's configuration and increase it if you have the resources.

The first error AFAICS is a general connection error. I have no idea what could cause this (save for the server crash which I doubt is the case).

Milen A. Radev