0
votes

I'm sorry if my question was answered already, but I cannot find it yet. I'm using C++ and connection pool to connect to a PostgreSQL database in a Win32 console application. It runs OK at the beginning. However, after a while the program received an error: "Server closed the connection unexpectedly. This probably means the server terminated abnormally before or while processing the request".

When I open the PostgreSQL log file, it shows message: "unexpected EOF on client connection, could not receive data from client: No connection could be made because the target machine actively refused it."

Thank you for any help.

1
Is there a firewall between the client and the server?Michael Slade
The server which PostgreSQL is running on has firewall on, The client's firewall off. I'm trying turning off the firewall on the server and will let you know the result then. Thanks you :)Tien Nguyen

1 Answers

0
votes

This really sounds like a network problem. I would be looking first at firewalls, then switches. I don't think a cable or a bad network card could cause a problem like this.

What sounds like is going on is that a connection is getting reset. If you eliminate network issues, then the next area to blame is the connection pooling software. Look at switching this out and see if the problem persists.