Recently I started having trouble connecting to my Ubuntu Linux/PostgreSQL server. Looking at phpPgAdmin or Webmin, I found the error too many clients already. The only way to fix it, has been to restart Postgre, or the server. The server is not open to the outside, other than through a web app, and a Deamon server app - both written in RS2012 R2.1. The web app has been disabled, so I know it is not that. The problem appears to be from the Console/Daemon app.
My issues are many, likely many also that I am not yet aware of. So to start, has anyone else had this, or have any suggestions to find the cause and stop it. The Daemon server app closes the Database connection and kills sets the object to NIL whenever a connection fails (or is disconnected for any reason). So there should never be too many clients.
I can recreate this easily. I run another program, also created in RS2012 R2.1 that connects to the server briefly, then disconnects. It does take a little time, but is fairly predictable. What I cannot do, is to look at the server, and see when a new db client is added, and removed. Does anyone know of tools that will show these things? The PostgreSQL server is, I think stock. It was installed when Ubuntu was installed. There are no other users (it is in my house!). As I found out the other day, outside connection attempts to its port 5432, are not accepted either.
Also, and equally worrisome, is that the operation of the remote and the server side Daemon/Server has not changed - to be clear, some of the code has changed, both to try to stop this and to expand the functionality of the apps - but the basic operation has not changed. This behavior has, for some reason, just recently started. It could even be from Ubuntu, PHP or other Dist updates/upgrades.
Further, I have found that if the Daemon process is killed, I am able to log in with phpPgAdmin, indicating that the PostgreSQL client count is reduced to a level allowing normal operation.
Any help, direction or ideas would be really really appreciated!