By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
437,933 Members | 1,686 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 437,933 IT Pros & Developers. It's quick & easy.

How to delete unclosed connections?

P: n/a
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,
-- Egyd 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.

---------------------------(end of broadcast)---------------------------
TIP 4: Don't 'kill -9' the postmaster

Nov 12 '05 #1
Share this Question
Share on Google+
4 Replies


P: n/a
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
<an****@libertyrms.info> M2P 2A8
+1 416 646 3304 x110
---------------------------(end of broadcast)---------------------------
TIP 8: explain analyze is your friend

Nov 12 '05 #2

P: n/a
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,
-- Egyd 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.

---------------------------(end of broadcast)---------------------------
TIP 8: explain analyze is your friend

Nov 12 '05 #3

P: n/a
On Thu, 9 Oct 2003, [Windows-1252] Egyd 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.
---------------------------(end of broadcast)---------------------------
TIP 1: subscribe and unsubscribe commands go to ma*******@postgresql.org

Nov 12 '05 #4

P: n/a
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.

---------------------------(end of broadcast)---------------------------
TIP 8: explain analyze is your friend

Nov 12 '05 #5

This discussion thread is closed

Replies have been disabled for this discussion.