[QGIS-Developer] too many database connections when using QgsTask

Rademacher.Anja at swm.de Rademacher.Anja at swm.de
Thu Jan 9 07:43:42 PST 2020


Hi all,

we want to load a qlr-file (QgsLayerDefinition.loadLayerDefinition)in the background using the QgsTask Class.

The loading time of the qlr-file is about 50 seconds due to the high number of layers.
During the loading time a dialog box with user feedback should appear.
The goal is to ensure that QGIS does not freeze, but simply does not respond to user clicks.

Now we have noticed that many (about 80) database connections are opened. These are only
closed when you exit QGIS even though the QgsTask is already finished.

Does anyone have any idea why there are so many database connections opened?
Is there a way to reduce the number of Database connections?
Is there a completely different approach to avoid freezing the UI?

Thanks for your help!

Kind regards.

Anja Rademacher



-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-developer/attachments/20200109/e6cf300f/attachment.html>


More information about the QGIS-Developer mailing list