[Qgis-developer] strange GetCapabilities caching
jmckenna at gatewaygeomatics.com
Mon Mar 28 12:30:55 PDT 2016
I feel your pain Nicklas.
I too recently battled this, for many many hours. I was setting up a
WMS service (through MapServer), with thousands of layers, but QGIS
would quickly display an error of "WMS provider Cannot calculate extent
Raster layer Provider is not valid", but only for the last layer in the
list (?). And yes, I was also having trouble copying this error, as it
only flashed on the screen for a few seconds :)
I likely spent over 10 hours on this. I have much WMS/OGC experience,
but this odd error (only returned in QGIS) really tested me ha.
I was not aware of clear cache settings in QGIS options, darn. I must
have rebooted and it went away finally.
I hope this discussion helps others, so that they can debug their WMS
MapServer Consulting and Training Services
On 2016-03-28 3:16 PM, Nicklas Avén wrote:
> Hallo all
> First, Thanks a lot for QGIS and QGIS Server. It is amazing software.
> But now I have had a very frustrating problem for the last 5 hours.
> After setting up a working QGIS server a few weeks ago, I now returned
> to see everything working after some major refactoring at the database.
> Nothing worked, and after some hours I started to get really frustrated
> since we have just a few weeks until we go in production and I really
> don't want to replace QGIS Server because of unpredictable behavior.
> The error I had was:
> Invalid Layer: WMS provider Cannot calculate extent Raster layer
> Provider is not valid (provider: wms, URI:
> contextualWMSLegend=0&crs=EPSG:4326&dpiMode=7&featureCount=10 ...
> on all layers but one.
> I saw this question was asked several times at the net, but no one
> seemed to have had any answer:
> The last link solved it by a fresh install and now I understand why.
> Finally I found the answer
> But the OP didn't get an answer of his follow up question: Why the h...
> is the GetCapabilities cached?
> I ask the same thing, especially since a new version of GetCapabilities
> is also fetched.
> This is what made me use 5 hours on debugging (including turning the
> server inside out, both database and uwsgi, nginx and so on).
> The layers presented when connecting to the wms server was fresh and
> new. But it seems like, when I tried to add the layer it used a cached
> GetCapabilities, which didn't correspond to my new setup on the server.
> I could also sniff the GetCapabilities request. But I also saw that no
> request was made when I tried to add the layer. So, now when I see the
> whole picture I look rather stupid, but I couldn't imagine that I had
> fresh data when connecting, but old data when trying to add the map.
> Another thing that made things bad was the error message just flashing
> on the top of my map. It didn't write anything to the log windows from
> what I could see, and the message was shown in a too thin box. So I had
> to try to add the layer, quickly close the "Add WMS window" and copy the
> text in the too thin box to be able to read it.
> Sorry for my frustrated tone. I still really love QGIS. But software
> (any software) can drive you crazy sometimes.
> I also suspect that I might get into exactly the same trap after a few
> months when i have forgotten this. I hope I find this mail then on my
> googling :-)
> Nicklas Avén
More information about the Qgis-developer