Bug report #10068

QGIS server caches layers with same ID but in different projects as one

Added by Olivier Dalang over 6 years ago. Updated about 2 years ago.

Status:Closed
Priority:Normal
Assignee:-
Category:QGIS Server
Affected QGIS version:2.14.2 Regression?:No
Operating System: Easy fix?:No
Pull Request or Patch supplied:No Resolution:
Crashes QGIS or corrupts data:No Copied to github as #:18544

Description

Hi !

When serving WMS maps, it seems QGIS servers caches the layers using their id, but with no regard to the project file.

Example :
myproject_1.qgs and myproject_2.gs both have a layer called mylayer with id mylayer20140515221023333 (this can easily happen if the project was duplicated for instance)

http://server/wms/myproject_1?LAYERS=mylayer&SERVICE=WMS&VERSION=1.1.1&REQUEST=GetMap&BBOX=10,10,20,20
Displays mylayer as in myproject_1.

http://server/wms/myproject_2?LAYERS=mylayer&SERVICE=WMS&VERSION=1.1.1&REQUEST=GetMap&BBOX=10,10,20,20
Displays mylayer as in myproject_1 instead of mylayer as in myproject_2 !!

At this point, the only way I found to display mylayer from myproject_2 is to restart the server, which makes it then in turn impossible to display mylayer from myproject1...

Thanks !!

Olivier


Related issues

Duplicates QGIS Application - Bug report #7956: QGIS Server: problem with two project with same layers Closed 2013-05-31

History

#1 Updated by Giovanni Manghi over 6 years ago

Unfortunately this is a well known issue, and there should be already a patch/pull request available.

One obvious solution would be to add a prefix like "projectname_" at the beginning of the actual layerid.

Please raise this issue in the dev mailing list, as it affects many (me included) I will underline too that a action must be taken.

#2 Updated by Alessandro Pasotti about 6 years ago

  • Priority changed from Normal to High

It seems it's still an issue in master. Can you confirm that?

#3 Updated by René-Luc ReLuc about 5 years ago

Updated in 2.8 version ?

#4 Updated by Nicolas Boisteault over 4 years ago

Problem still occurs in 2.14.2.

#5 Updated by Giovanni Manghi over 3 years ago

  • Affected QGIS version changed from 2.2.0 to 2.14.2
  • Status changed from Open to Feedback

Still an issue in 2.18.4?

#6 Updated by Giovanni Manghi over 3 years ago

  • Priority changed from High to Normal

#7 Updated by Giovanni Manghi over 3 years ago

  • Regression? set to No
  • Easy fix? set to No

#8 Updated by Giovanni Manghi over 3 years ago

  • Status changed from Feedback to Open
  • Description updated (diff)

#9 Updated by Giovanni Manghi about 2 years ago

  • Status changed from Open to Closed

Closing for lack of feedback.

Also available in: Atom PDF