Main Topics
Browse All TopicsI 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
This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.
Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.
If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.
Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.
Access the answers to your technology questions today.
30-day free trial. Register in 60 seconds.
Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Try it out and discover for yourself.
30-day free trial. Register in 60 seconds.
Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.
Business Accounts
Answer for Membership
by: poweredsPosted on 2009-11-01 at 10:56:52ID: 25714890
Hi,
.conf on the section below.
Try checking /var/lib/pgsql/data/pg_hba
# TYPE DATABASE IP_ADDRESS MASK AUTHTYPE MAP
# Allow any user on the local system to connect to any
# database under any username, but only via an IP connection:
host all 127.0.0.1 255.255.255.255 trust
Hope this helps.