Обсуждение: How to delete unclosed connections?
Hi All, I've a problem with unclosed connections. Once a client aborts a connection accidentelly (client crash or power failure eg.), it stucks in and postgres won't restart or stop. Is there any way to close unused (dead) connections. I'd guess that some kind of connection timeout option should do this. Aren't I right? Tank you in advance. Best Regards, -- Együd Csaba --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.522 / Virus Database: 320 - Release Date: 2003. 09. 29.
On Wed, Oct 08, 2003 at 11:22:12AM +0200, Egy?d Csaba wrote: > I've a problem with unclosed connections. Once a client aborts a > connection accidentelly (client crash or power failure eg.), it > stucks in and postgres won't restart or stop. Is there any way to Oh? pg_ctl -m f stop or pg_ctl -m i stop doesn't work? > close unused (dead) connections. I'd guess that some kind of Find the pid and kill -2 will work. > connection timeout option should do this. Aren't I right? It will, once the TCP/IP timeout happens. That's about 2 hours on many systems. A -- ---- Andrew Sullivan 204-4141 Yonge Street Afilias Canada Toronto, Ontario Canada <andrew@libertyrms.info> M2P 2A8 +1 416 646 3304 x110
Hi Andrew, > Oh? pg_ctl -m f stop or pg_ctl -m i stop doesn't work? Aha, I'll try it. > Find the pid and kill -2 will work. To tell the truth I do not like to kill a database backend. It can lead many problems. I prefer indulgent methods instead, you know. It'll be the ultimate solution. > It will, once the TCP/IP timeout happens. That's about 2 hours on many systems. I see, it sholud be waited for... Thank you very much Anderw! Best Regrds, -- Együd Csaba --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.522 / Virus Database: 320 - Release Date: 2003. 09. 29.
On Thu, 9 Oct 2003, [Windows-1252] Együd Csaba wrote: > Hi Andrew, > > Oh? pg_ctl -m f stop or pg_ctl -m i stop doesn't work? > Aha, I'll try it. > > > Find the pid and kill -2 will work. > To tell the truth I do not like to kill a database backend. It can lead many > problems. I prefer indulgent methods instead, you know. > It'll be the ultimate solution. Only for your applications. Postgresql survives this kind of thing quite well, with no data corruption, trust me, I've tested that part thourougly lately.
Hi Scott, > Only for your applications. Postgresql survives this kind of > thing quite > well, with no data corruption, trust me, I've tested that > part thourougly > lately. OK, I trust you. To tell the truth I've never faced serious problems in connection with killing postgres. But as far as I'm concerned I could never exclude this possibility. If I can solve my problem in a regular way I choose that way, but I won't hesitate killing postgres when the time comes... On the other hand my applications are strong enough to avoid serious problems. The most important thing is the health of the backend. But as you mentioned it is not a question anymore. Thank you. -- Csaba > > --- > Incoming mail is certified Virus Free. > Checked by AVG anti-virus system (http://www.grisoft.com). > Version: 6.0.522 / Virus Database: 320 - Release Date: 2003. 09. 29. > --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.522 / Virus Database: 320 - Release Date: 2003. 09. 29.