I have a problem: My PostgreSQL server runs on a FreeBSD server.
The server is in a LAN.
The LAN's router forwards the 5432 port for external connections to the server.
I have a database on the server.
I access this database from 2 types of locations:
- LAN
- WAN
(using of course as Host the LAN IP for local connections and the WAN IP for external connections)
When I start an application from inside the LAN, I have no problems.
When I start the same application from WAN, the connection dies in a few minutes after last user input.
So If I start pgAdmin III from a WAN location, I can connect easily to the server, but if I do not work with the connection for 1-2 minutes... the connection brakes, so when I try after 2 minutes to do something in pgAdmin, I receive error messages:
"An error has occurred:
server closed the connection unexpectedly.
This probably means the server terminated abnormally
before of while processing the request".
I get this message always 3 times.
When I connect to the database using Delphi (all the same settings) the same behavior happens. From LAN ... no problem, from WAN... after leaving the application alone... it disconnects from the server.
I do not understand this problem. It is probably somewhere in the postgresql.conf file. I did not modify it when building the server...
I will paste it if you need it in order to help.
Please advise