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-server mixing layer db-connections #21155

Closed
qgib opened this issue Jul 8, 2015 · 2 comments
Closed

qgis-server mixing layer db-connections #21155

qgib opened this issue Jul 8, 2015 · 2 comments
Labels
Bug Either a bug report, or a bug fix. Let's hope for the latter! Crash/Data Corruption Server Related to QGIS server

Comments

@qgib
Copy link
Contributor

qgib commented Jul 8, 2015

Author Name: Tom Palan (@tpalan)
Original Redmine Issue: 13088
Affected QGIS version: master
Redmine category:qgis_server


Environment:

2 PostGIS databases
2 project files, one for each database

When using the qgis-web-client and qgis-server to display the projects, the qgis-server mixes the database-connections and displays data from the other project. This happens randomly, but is reproducible after a few tries.
It only happens when the 2 projects are accessed simultaneously (e.g. using 2 browsers, and switching between them).

I compiled qgis-server from source (2015-06-08), and added some debug statements. Somehow after the QgsPostgresProvider for the layer is created (Line: "p3: Table name is.."), some calls to featureSource return the right datasource-uri, and some use another.
That's how far I got.

This happens on my Ubuntu 14.04 /64bit and Debian Jessie 64bit, using Apache2

I would be happy to supply some more information.


@qgib
Copy link
Contributor Author

qgib commented Jul 9, 2015

Author Name: Tom Palan (@tpalan)


Update: The problem only occures if the 2 projects have layers with the same name. Apparently somewhere in QgsWMSProjectParser::mapLayerFromStyle (when called with useCache=true) mixes layers from different projects.
I was able to "fix" it by disabling caching of layers, see patch. As this is only a temporary fix, could somebody with more knowledge of QGIS chime in?


  • 8917 was configured as disable_layer_caching.patch

@qgib
Copy link
Contributor Author

qgib commented Jul 9, 2015

Author Name: Marco Hugentobler (@mhugent)


It happened if two layers have the same id and the same layer name. But it should be fixed in master branch already (127dd64)


  • status_id was changed from Open to Closed

@qgib qgib added Bug Either a bug report, or a bug fix. Let's hope for the latter! Server Related to QGIS server Crash/Data Corruption labels May 25, 2019
@qgib qgib closed this as completed May 25, 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! Crash/Data Corruption Server Related to QGIS server
Projects
None yet
Development

No branches or pull requests

1 participant