LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 04-19-2019, 01:36 PM   #1
rnturn
Senior Member
 
Registered: Jan 2003
Location: Illinois (SW Chicago 'burbs)
Distribution: openSUSE, Raspbian, Slackware. Previous: MacOS, Red Hat, Coherent, Consensys SVR4.2, Tru64, Solaris
Posts: 2,803

Rep: Reputation: 550Reputation: 550Reputation: 550Reputation: 550Reputation: 550Reputation: 550
PostgreSQL database connections hang after client reboot


I had a PostgreSQL database hang a while ago under odd circumstances. A test run of a Python+psycopg2 script was inserting rows into the database when the client froze (or otherwise became non-responsive to anything I tried at the keyboard--I suspect the desktop manager was the cause) requiring a reboot. After the client had been rebooted, re-running the data load hung up. Again. A remote pqsql connection to the database I tried starting was non-responsive as well. The client system wasn't experiencing any further problems. An ssh connection to the database server allowed me to bounce the database and clear the condition--whatever it was--and I could restart the load script and it ran to completion. There's nothing in the PostgreSQL log that shows any problems other than a prior error about a non-escaped apostrophe (that my script had failed to catch and deal with) in a value that failed to load earlier.

Anyone seen something like this happen before and have any ideas what would have caused the database connections to become catatonic like this?

I'm not usually doing low-level monitoring of the network activity between two boxes when running scripts like this so I'm sure there's helpful information that wasn't collected. And I'm not certain I could reproduce the problem if I wanted to. BTW, manually aborting the script (^C) hasn't caused any problems like this in the past so I seriously doubt it would help for debugging this. If anyone has done this kind of monitoring of database connections, pointers on what tools you use for this--wireshark, etc.--would be most helpful.

Is there anything that can be done to avoid having to take the whole database down to clear connection problems? Fortunately, or unfortunately (depending on your point of view), there wasn't anything else that was trying to use the database at the time. If there had been, that might have helped determine whether this was only affecting the connection between those two hosts or whether the entire database was hung up.

Any pointers welcomed.

TIA...
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
LXer: Difference Between PostgreSQL And MySQL And How To Migrate From MySQL To PostgreSQL LXer Syndicated Linux News 0 05-27-2017 08:26 PM
LXer: The PostgreSQL Global Development Group's PostgreSQL LXer Syndicated Linux News 0 03-31-2016 07:35 PM
Database Programming (database to database transaction) johncsl82 Programming 7 02-02-2007 08:20 AM
Reboot blue screen hang after install budo41 Fedora - Installation 5 03-01-2006 06:27 PM
postgresql -odbc & postgresql-jdbc installation kjsubbu Linux - Software 0 06-19-2003 02:50 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 04:45 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration