Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

qgis hang when postgres close the connection #14716

Closed
qgib opened this issue Jan 29, 2012 · 10 comments
Closed

qgis hang when postgres close the connection #14716

qgib opened this issue Jan 29, 2012 · 10 comments
Labels
Bug Either a bug report, or a bug fix. Let's hope for the latter!
Milestone

Comments

@qgib
Copy link
Contributor

qgib commented Jan 29, 2012

Author Name: aperi2007 - (aperi2007 -)
Original Redmine Issue: 4909
Affected QGIS version: master


Using qgis and postgres/postgis.
I notice that when I stop my work for a lot of time (40-50 minutes), postgres logically close the connection for client inactivity.
When I try to continue my work, qgis will hang waiting postgres will response. And is necessary to kill qgis and restart it.

I guess actually qgis open the connection to the postgres when I add a postgres table to the canvas and i presume it will remain open forever.
Instead qgis should test the connection every 10-15 minutes for every distinct istance of postgres used in the canvas and try to reopen the connection if it is find closed.



Related issue(s): #13375 (duplicates)
Redmine related issue(s): 3315


@qgib
Copy link
Contributor Author

qgib commented Jan 29, 2012

Author Name: Jürgen Fischer (@jef-n)


Which version do you use? master should survive connection losses.

@qgib
Copy link
Contributor Author

qgib commented Jan 30, 2012

Author Name: Giovanni Manghi (@gioman)


Hi Jurgen, I'm using master. Just tested a 1 hour idle time, after that any action makes qgis hang.

@qgib
Copy link
Contributor Author

qgib commented Jan 30, 2012

Author Name: Jürgen Fischer (@jef-n)


Giovanni Manghi wrote:

Hi Jurgen, I'm using master. Just tested a 1 hour idle time, after that any action makes qgis hang.

Not reproducable here. And debug output?

@qgib
Copy link
Contributor Author

qgib commented Jan 30, 2012

Author Name: Giovanni Manghi (@gioman)


Not reproducable here. And debug output?

try the attached project (with only postgis data). Let me know if it works fine for you.


  • 4217 was configured as filipe_rafael_13_12_2011.qgs

@qgib
Copy link
Contributor Author

qgib commented Jan 30, 2012

Author Name: Jürgen Fischer (@jef-n)


Fixed in changeset "262392093356f7600089bf44d19984b56ec85bab".


  • done_ratio was changed from 0 to 100
  • status_id was changed from Open to Closed

@qgib
Copy link
Contributor Author

qgib commented Mar 5, 2012

Author Name: aperi2007 - (aperi2007 -)


oops, it is again here.
I still experience with this bug.

After a while, when postgres close the connection,
qgis hang because don't re-open the connection.

I use postgres 9.1.3 and postgis 2.0 beta2.
Also I use qgis-dev (for windows ) 3a2c0e9.

Andrea.


  • status_id was changed from Closed to Reopened

@qgib
Copy link
Contributor Author

qgib commented Mar 5, 2012

Author Name: Giovanni Manghi (@gioman)


it happens also with postgres 8.4/postgis 1.5 and qgis master

@qgib
Copy link
Contributor Author

qgib commented Mar 14, 2012

Author Name: Giovanni Manghi (@gioman)


I use postgres 9.1.3 and postgis 2.0 beta2.
Also I use qgis-dev (for windows ) 3a2c0e9.

Andrea.

This may be not a QGIS problem after all. What I have noticed is that if I connect to a PostgreSQL server that is the same "local" network (in my case is the pretty big network of a University) then the connection does not fall. If I connect to the same server but from a remote connection then the connection falls after a while. I say that is probably not a QGIS problem because the same thing happens also with PgAdmin.

@qgib
Copy link
Contributor Author

qgib commented Sep 4, 2012

Author Name: Paolo Cavallini (@pcav)


  • fixed_version_id was configured as Version 2.0.0

@qgib
Copy link
Contributor Author

qgib commented Oct 1, 2013

Author Name: Jürgen Fischer (@jef-n)


Fixed in changeset "262392093356f7600089bf44d19984b56ec85bab".


  • status_id was changed from Reopened to Closed

@qgib qgib added the Bug Either a bug report, or a bug fix. Let's hope for the latter! label May 24, 2019
@qgib qgib added this to the Version 2.0.0 milestone May 24, 2019
@qgib qgib closed this as completed May 24, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Either a bug report, or a bug fix. Let's hope for the latter!
Projects
None yet
Development

No branches or pull requests

1 participant