9

I have a QGIS 2.6 project with around 20 vector layers and an WMS layer (working on Ubuntu 14.04). WMS rendering works OK, although a little bit slow, and exporting A4-size maps also works properly (both to jpg and pdf), but the thing gets tricky when trying to export my final-size map, almost an A0.

Most of the time, some of the tiles of the WMS don't appear in the resulting pdf or jpg (see image below). However, I did export a large a week ago. In fact, the map I cannot export now is exactly the same I printed before, after querying one of the layers.

This how the resulting pdf looks like

I have tried several "work-arounds":
* Print to a pdf printer, instead of exporting it. Same result.
* Erase the WMS layer and define it again, from scratch. * Have deleted the map from the composition and defined it again. No change.
* Have finally tried with a new project and defining a similar size map...and the problem is still there.
* I have tried to uninstall and reinstall. Everything seems the same (even the plugins are still there).
* I have tried to export it in a Windows QGIS (both in a Windows partition and in a Windows virtual machine). The first try with Windows worked OK, but now I face the same problem as in Ubuntu.

A couple of ideas:
* could it be a problem of the connection with the WMS server? However, WMS rendering works properly.
* could it be QGIS runs our of memory? If I leave the system monitor open I realize that QGIS would only use 2 of my 8 cores, and not simultaneously, and the core that is in use arrives at 100% of usage. Similarly, used memory never goes beyond 2Gb, but I have 16Gb (and 3Gb in the graphic card).

Hope someone can give me a hint... as I have all my project in QGIS and now cannot get my final result.

Edit
I also tried with limiting tile size, but the problem persisted (with smaller blank tiles, though).
Then I tried doubling the timeout and max-retries parameters, as suggested by . It did work perfectly... at least at that time... One month later I faced the same problem again. This time with a small map (DinA4 size, the previous one was an A0). I have set timeout to 50000 ms and max retries to 20!! No changes.
Two additional details might help figure out where the problem comes from:
* The blank tiles are always the same. Not from a month ago to now, but everytime I face the issue the blank tiles would remain fix during all the trials I do to overcome the problem. That doesn't point to a problem with the internet conection, does it?
* The export image is created in a few seconds, not more than 30, which also suggests timeout parameter is not involved (or not working).

Edit
I found that when this problem arises it stays there no matter what I do, with always the same tiles missing. However, if I let it for a couple of days, it disappears. I mean, once it happens it will happen again in all trials during a couple of days; but if I forgot about it and try two days later it works perfectly again. Seems as if it has some kind or memory... Once the communication has failed for whatever reason it will remember it for a couple of days...

  • I'm having this same problem. None of the workarounds worked for me. – Chris Jun 6 '16 at 17:23
  • having the same problem in Qgis 3.4.2, restart Qgis completly solves it so far. – user16032 Dec 5 '18 at 18:29
7

Other than tile size, as noted by @Irssvt, you can also set some timeout and tile retry parameters.

Default timeout per connection is in Settings->Options->network->Timeout for network requests

Retry in case of timeout is in Settings->Options->network->Max retry in case of tile request errors.

I coded the last retry parameters in QGIS, funded by Regione Toscana, exactly to solve problems like that you exposed.

  • 1
    Limiting tile size resulted in smaller gaps in my map (those of smaller tiles), but still notorious gaps. However, doubling the timeout and max retry values solved the problem. – Asier Dec 2 '14 at 17:00
2

Sometime that could occurs with slow connection. You could try to set a tile size for your WMS layer. Change Tile size (e.g 256x256) in WMS Connecition dialog and you see if it works for you:

enter image description here

Sometime it helped me for large compositions. Hope this helps.

1

I was able to get around this by increasing the cache size under Settings > Options > Network > Cache Settings > Size.

It appears to default to 0, and uses about 4KB per export. When I increased the cache size to 100MB, it used 14MB to store the WMS tiles.

All tiles now appear consistently in the exports.

0

Could also be RAM available to QGIS... look in Settings for Network and Cache, increase to as much as you like. There is also Cache in Settings for Print Composer.

Would suggest that QGIS look at how they allocate the Cache and see Adobe Photoshop examples of Purge etc, which are really useful.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.