Thread: Postgresql server "crash" after some day

Postgresql server "crash" after some day

From
"Stefano B."
Date:
Hi all,
 
I have some strange problems with postgres.
After some days it works in local but it doesn't listen on port 5432 for remote request.
 
I can make a connection from local host but I can't from remote host. If I try to make a connection from remote host the server returns me the classic remote error:
 
    could not connect to server ... is the server running on host ... and accepting TCP/IP connections on port 5432?
 
This problem happens after some day that I have start the server.
There is no particular error in the log file (the server seems to work)
 
PostgreSql version: 8.0.3
on FreeBSD 5.3
 
Thanks in advance.

Re: Postgresql server "crash" after some day

From
Csaba Nagy
Date:
Is it possible that you're application is not closing connections, and
the server has a limit on connection count, and that is reached in a few
days ? Actually I'm not sure if the "max_connections" parameter is
applicable to local connections too, cause in that case you shouldn't be
able to connect locally either...

Just a thought.

Cheers,
Csaba.

On Wed, 2005-08-17 at 14:55, Stefano B. wrote:
> Hi all,
>
> I have some strange problems with postgres.
> After some days it works in local but it doesn't listen on port 5432
> for remote request.
>
> I can make a connection from local host but I can't from remote host.
> If I try to make a connection from remote host the server returns me
> the classic remote error:
>
>     could not connect to server ... is the server running on host ...
> and accepting TCP/IP connections on port 5432?
>
> This problem happens after some day that I have start the server.
> There is no particular error in the log file (the server seems to
> work)
>
> PostgreSql version: 8.0.3
> on FreeBSD 5.3
>
> Thanks in advance.


Re: Postgresql server "crash" after some day

From
Tino Wildenhain
Date:
Stefano B. schrieb:
> Hi all,
>
> I have some strange problems with postgres.
> After some days it works in local but it doesn't listen on port 5432 for
> remote request.
>
> I can make a connection from local host but I can't from remote host. If
> I try to make a connection from remote host the server returns me the
> classic remote error:
>
>     could not connect to server ... is the server running on host ...
> and accepting TCP/IP connections on port 5432?
>
> This problem happens after some day that I have start the server.
> There is no particular error in the log file (the server seems to work)
>
> PostgreSql version: 8.0.3
> on FreeBSD 5.3

after some day? If you did not change the config files and if there
was not another process using that port during the start, chances
are you configured a firewall which just refuses connections to port
5432?



Re: Postgresql server "crash" after some day

From
Tom Lane
Date:
"Stefano B." <stefano.bonnin@comai.to> writes:
> I can make a connection from local host but I can't from remote host. If =
> I try to make a connection from remote host the server returns me the =
> classic remote error:

>     could not connect to server ... is the server running on host ... =
> and accepting TCP/IP connections on port 5432?

You've suppressed the part of that message that's actually useful ---
what was the kernel error message exactly?

> This problem happens after some day that I have start the server.

I'm betting it's a firewall kind of problem.  What is between your
remote host and the database server?

            regards, tom lane