0

On one of our legacy systems we receive this error message from libpq driver of postgresql. It happens at random times for any of our SQL statements.

psql query begin returned PGRES_FATAL_ERROR - could not receive data from server: Bad file descriptor

The library versions are:

postgresql-10/now 10.18-1.pgdg90+1 amd64 [installed,upgradable to: 10.22-1.pgdg90+1]
postgresql-client-10/now 10.18-1.pgdg90+1 amd64 [installed,upgradable to: 10.22-1.pgdg90+1]
postgresql-client-common/now 231.pgdg90+1 all [installed,upgradable to: 242.pgdg90+1]
postgresql-common/now 231.pgdg90+1 all [installed,upgradable to: 242.pgdg90+1]
libpq5/now 14.0-1.pgdg90+1 amd64 [installed,upgradable to: 14.5-1.pgdg90+1]
Gerhardh
  • 11,688
  • 4
  • 17
  • 39
user510799
  • 63
  • 5
  • https://stackoverflow.com/questions/34318233/connect-bad-file-descriptor-postgresql-log-file is hopefully a long shot, but it may be a good idea to check if your program is the only one using that database. – tevemadar Jul 24 '23 at 12:00
  • @tevemadar - unfortunately this answer is not relevant. This application is the only one using the database, we have "some" logging on and we are not generating GB per day. I can also guarantee we are not running malicious software. – user510799 Jul 24 '23 at 15:49
  • The error message is clear: the socket that belongs to to the database connection on the client machine has been closed. You have to figure out why: perhaps your application already disconnected, perhaps the connection was closed by the server or dropped by a misconfigured network component. – Laurenz Albe Jul 24 '23 at 19:00

0 Answers0