473,386 Members | 1,867 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

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.

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

Nov 12 '05 #1
4 5926
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
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.

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

Nov 12 '05 #3
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.
---------------------------(end of broadcast)---------------------------
TIP 1: subscribe and unsubscribe commands go to ma*******@postgresql.org

Nov 12 '05 #4
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Hitesh Bhatiya | last post by:
Hi all, I have written a small program to accept some socket connections, which are then added to a vector (using push_back). But after a few calls to the push_back function, it deleted the...
3
by: compu_global_hyper_mega_net_2 | last post by:
I'd like to do something like: delete from a where id in (select * from b where pattern like '%something%') I may or may not have the syntax right. I know that this sort of subquery isn't...
0
by: Marc van Boven | last post by:
I'm stuck with the following problem: My nusoap-client calls a server-function giveCombination(). The function giveCombination should return something like array( => array( 'a_id' => 6,...
4
by: UJ | last post by:
I have a program that will upgrade a service automatically. If the service already exists, it will delete the service and then reinstall it through code. To delete the service I'm using the...
0
by: Iham Sheen | last post by:
Hi, When I click at the Update button to commit changes in a MxDataGrid, I get the error message "Unclosed quotation mark ...." if there is a single quote in any of the columns. How can I work...
3
by: Stan Brown | last post by:
URL: http://oakroadsystems.com/about/donate.htm does not validate. On every INPUT line I get 'Line 17 column 47: document type does not allow element "INPUT" here; missing one of "P", "H1",...
9
by: Osamede Zhang | last post by:
I just find i can't understand the code like this int main() { int *p=new int; //do something delete p; return 1; } I use new operator allocate some memory in the heap,now i don't need...
0
by: gert | last post by:
Hi, can anybody tell me what i did wrong please ? I get unclosed token in line 1 running ./make.sh http://dfo.svn.sourceforge.net/viewvc/dfo/trunk/cgi/make.sh?revision=165&view=markup ...
2
by: MLH | last post by:
Am using A97. Have defined Machine Data Source type DSNs in Access' File, Get External Data, Link Tables, Files of Type ODBC, Machine Data Source tab. Have many definitions. Would like to delete...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.