Thread: Idle connections - Too many clients connected already
Hello, After using Postgresql for a while, through ODBC / MS Access, I'm not able to connect to the server anymore. The server reports "Too many clients connected already". With a "ps -afx", I can see a lot of idle postgresql connections on the server, which correspond for sure to ODBC connections that haven't been closed properly, and that remain opened. Stopping and restarting the server solves the problem. Is there a way to avoid that? I cannot certifiy that clients will always close their connexions in a clean way. So, is the server able to check if clients are still alive, and close their connection if it's not the case? Thanks Philippe
On Thursday 22 January 2004 06:57, Philippe Lang wrote: > Hello, > > After using Postgresql for a while, through ODBC / MS Access, I'm not > able to connect to the server anymore. The server reports "Too many > clients connected already". [snip] > Is there a way to avoid that? I cannot certifiy that clients will always > close their connexions in a clean way. So, is the server able to check > if clients are still alive, and close their connection if it's not the > case? You can set a timeout for the ODBC on each client. I can't remember if this is in the odbc driver settings panel or where. Worst case, it's a registry setting. That should do what you want. -- Richard Huxton Archonet Ltd
Hello, I have already activated this option in the registry. It is necessary in order to avoid a connection drop when the clientis idle for some time. But my problem is different here. I would like a connection to be dropped on the server when the client has disconnected... Philippe -----Message d'origine----- De : Richard Huxton [mailto:dev@archonet.com] Envoyé : jeudi, 22. janvier 2004 11:33 À : Philippe Lang; pgsql-odbc@postgresql.org Objet : Re: [ODBC] Idle connections - Too many clients connected already On Thursday 22 January 2004 06:57, Philippe Lang wrote: > Hello, > > After using Postgresql for a while, through ODBC / MS Access, I'm not > able to connect to the server anymore. The server reports "Too many > clients connected already". [snip] > Is there a way to avoid that? I cannot certifiy that clients will > always close their connexions in a clean way. So, is the server able > to check if clients are still alive, and close their connection if > it's not the case? You can set a timeout for the ODBC on each client. I can't remember if this is in the odbc driver settings panel or where.Worst case, it's a registry setting. That should do what you want. -- Richard Huxton Archonet Ltd