lizmap-web-client icon indicating copy to clipboard operation
lizmap-web-client copied to clipboard

[Bug]: Caching/Seeding not working

Open gioman opened this issue 2 years ago • 43 comments

What is the bug?

Following te commands described in

https://docs.lizmap.com/current/en/admin/cache.html#seeding

the result is always

No layers configured with cache!

even if the project has indeed layers with server caching active.

This has been tested on a LMWC 3.6.3 installation made from scratch and as well on 3.6.3 upgraded from previous releases. To note that on 3.6.2 the seeding/wmts capabilities commands were returning errors, like the ones described here

https://lists.osgeo.org/pipermail/lizmap/2023-May/000647.html

The upgrade to 3.6.3 solved the errors, but seeding is not possible as the script do not seems to detect any layer with caching active.

Steps to reproduce the issue

See above.

Versions

LMWC 3.6.3, latest versions of Lizmap plugins.

Check Lizmap plugin

  • [X] I have done the step just before in the Lizmap QGIS desktop plugin before opening this ticket. Otherwise, my ticket is not considered valid and might get closed.

QGIS server version, only if the section above doesn't mention the QGIS Server version

3.28

Operating system

Ubuntu 22.04, desktop and server

Browsers

Firefox, Chrome

Browsers version

Latest

Relevant log output

No response

gioman avatar May 22 '23 08:05 gioman

By default , the layer montpellier/Bus isn't configure to cache see https://github.com/3liz/lizmap-web-client/blob/0879866cd74727e65156a5cbaacf14f1380cff6c/extra-modules/lizmapdemo/qgis-projects/demoqgis/montpellier.qgs.cfg#L260

When testing the test project cache/bus https://github.com/3liz/lizmap-web-client/blob/0879866cd74727e65156a5cbaacf14f1380cff6c/tests/qgis-projects/tests/cache.qgs.cfg#L82 capabilities and seeding works as exepected

I manually set "cached" = "True" in the conf file, and the layer "Bus" was then able to cache , how did you enable server caching ?

However, the doc is quite confusing, the sample project file doesn't have any layer configured to allow cache.

nworr avatar May 22 '23 15:05 nworr

@nworr I'm not using the demo project. I have enabled server caching with the LM plugin (and caching is indeed enabled when navigating in LMWC).

gioman avatar May 23 '23 07:05 gioman

Please remove the feedback label.

The CFG file is ok

image

but seeding scripts will always return

No layers configured with cache!

gioman avatar May 31 '23 21:05 gioman

The dedicated test is working as expected : cypress end2end launch by github see results : test results .

Locally, i can't reproduce.

Does the wmts:capabilities command show some special output ?

nworr avatar Jun 01 '23 07:06 nworr

Please share different commands you have launched and their outputs.

Gustry avatar Jun 01 '23 07:06 Gustry

Please share different commands you have launched and their outputs.

@Gustry @nworr it seems to me that is another case of LMWC being finicky with layer names. As in https://github.com/3liz/lizmap-web-client/issues/3660 it took me a few hours of troubleshooting to get to the conclusion.

  1. (always, not related to layer name) wmts:cacabilities never show for XYZ layers, for example added from the Browser or from a plugin like QuickMapservices

  2. If a layer/datasource is added in QGIS and its name has no spaces, and it is left unchanged in QGIS then it shows in wmts:cacabilities (the name given in LM plugin is not affecting this)

  3. if the layer/datasource name has spaces in it, then it never shows in wmts:cacabilities, regardless if the name is changed in QGIS project in order to replace spaces with something else, like "_".

  4. If the layer/datasource name has no spaces in it, but the name is changed to something else in QGIS with spaces, then it does not show in wmts:cacabilities

Having the possibility to at least have layer names with spaces and other stuff in QGIS project is important, because otherwise this has the effect to having to change it manually in at least two other places, LM plugin and the project print layouts legends.

gioman avatar Jun 01 '23 09:06 gioman

More:

specifying tilematrix level 0 generates en error (even if level 0 is always shown as part of the wmts:capabilities of a layer)

php lizmap/console.php wmts:cache:seed -v -f reponame projname layername EPSG:3857 0 6
TileMatrixMin and TileMatrixMax must be of type int

gioman avatar Jun 01 '23 10:06 gioman

More:

activating cache on a layer/datasource (gpkg) called "zona_contigua_24NM" causes the wmts:capabilities script to return an error:

For "zona_contigua_24NM" and "EPSG:4326" from TileMatrix 2 to 8
PHP Fatal error:  Uncaught ValueError: min(): Argument #1 ($value) must contain at least one element in /var/www/html/mapas/lizmap/modules/lizmap/lib/CliHelpers/WMTSCache.php:106
Stack trace:
#0 /var/www/html/mapas/lizmap/modules/lizmap/lib/CliHelpers/WMTSCache.php(106): min()
#1 /var/www/html/mapas/lizmap/modules/lizmap/lib/Commands/WMTSCapabilities.php(40): Lizmap\CliHelpers\WMTSCache->capabilities()
#2 /var/www/html/mapas/lizmap/vendor/symfony/console/Command/Command.php(298): Lizmap\Commands\WMTSCapabilities->execute()
#3 /var/www/html/mapas/lizmap/vendor/symfony/console/Application.php(1040): Symfony\Component\Console\Command\Command->run()
#4 /var/www/html/mapas/lizmap/vendor/symfony/console/Application.php(301): Symfony\Component\Console\Application->doRunCommand()
#5 /var/www/html/mapas/lizmap/vendor/symfony/console/Application.php(171): Symfony\Component\Console\Application->doRun()
#6 /var/www/html/mapas/lizmap/vendor/jelix/jelix/lib/jelix/Scripts/ModulesCommands.php(48): Symfony\Component\Console\Application->run()
#7 /var/www/html/mapas/lizmap/console.php(2): Jelix\Scripts\ModulesCommands::run()
#8 {main}
  thrown in /var/www/html/mapas/lizmap/modules/lizmap/lib/CliHelpers/WMTSCache.php on line 106

gioman avatar Jun 01 '23 10:06 gioman

Does your layer zona_contigua_24NM have a scale constraint ?

nworr avatar Jun 01 '23 11:06 nworr

Does your layer zona_contigua_24NM have a scale constraint ?

@nworr yes

gioman avatar Jun 01 '23 12:06 gioman

@nworr yes

@nworr if that is the cause of the error maybe is worth considering catch the error and return a meaning message to the user.

gioman avatar Jun 01 '23 12:06 gioman

Yes the PHP Fatal error: Uncaught ValueError: min() is related to a bug with scale, thank you for detailing this case.

it looks like none of the tile levels are within the min-max scale interval, must investigate.

https://github.com/3liz/lizmap-web-client/blob/3c4dd307eb2aa26a5e13b5b3d2498a17119d1110/lizmap/modules/lizmap/classes/lizmapTiler.class.php#L540

nworr avatar Jun 01 '23 12:06 nworr

Possibly found another corner case;

I have a layer called "grid" in a geopackage with the same name. No way that this layer shows in wmts:capabilities, but at the same time LMWC correctly creates the cache while navigating the map.

Maybe "grid" is some sort of reserved word?

gioman avatar Jun 01 '23 18:06 gioman

I have a layer called "grid" in a geopackage with the same name. No way that this layer shows in wmts:capabilities, but at the same time LMWC correctly creates the cache while navigating the map.

and overnight... it magically decided to show in the capabilities...

gioman avatar Jun 02 '23 09:06 gioman

@Gustry @nworr I'll continue to add questions/potential issues about caching/seeding here, let me know if/where you want me to split this into separate tickets.

I have a project that returns the following capabilities

For "sat" and "EPSG:4326" from TileMatrix 0 to 15
For "sat" and "EPSG:5016" from TileMatrix 0 to 10
For "sat" and "EPSG:3857" from TileMatrix 0 to 16

and for the layer

For "sat" and "EPSG:5016" the TileMatrix 0 has 1 tiles
For "sat" and "EPSG:5016" the TileMatrix 1 has 1 tiles
For "sat" and "EPSG:5016" the TileMatrix 2 has 4 tiles
For "sat" and "EPSG:5016" the TileMatrix 3 has 4 tiles
For "sat" and "EPSG:5016" the TileMatrix 4 has 4 tiles
For "sat" and "EPSG:5016" the TileMatrix 5 has 8 tiles
For "sat" and "EPSG:5016" the TileMatrix 6 has 24 tiles
For "sat" and "EPSG:5016" the TileMatrix 7 has 112 tiles
For "sat" and "EPSG:5016" the TileMatrix 8 has 416 tiles
For "sat" and "EPSG:5016" the TileMatrix 9 has 1664 tiles
For "sat" and "EPSG:5016" the TileMatrix 10 has 10240 tiles

When I seed with the script, what do mean that first two lines that end with "!"? It is something that can be ignored?

php lizmap/console.php wmts:cache:seed -v -f reponame projectname sat EPSG:5016 1 10
The TileMatrixSet 'EPSG:4326'!
The TileMatrixSet 'EPSG:5016'!
1 tiles to generate for "sat" "EPSG:5016" "1"
4 tiles to generate for "sat" "EPSG:5016" "2"
4 tiles to generate for "sat" "EPSG:5016" "3"
4 tiles to generate for "sat" "EPSG:5016" "4"
8 tiles to generate for "sat" "EPSG:5016" "5"
24 tiles to generate for "sat" "EPSG:5016" "6"
112 tiles to generate for "sat" "EPSG:5016" "7"
416 tiles to generate for "sat" "EPSG:5016" "8"
1664 tiles to generate for "sat" "EPSG:5016" "9"
10240 tiles to generate for "sat" "EPSG:5016" "10"
12477 tiles to generate for "sat" "EPSG:5016" between "1" and "10"
Start generation
================

gioman avatar Jun 02 '23 10:06 gioman

Does

lizmap/install/set_rights.sh

really set the rights correct for tiles when the cache dir has been set to something custom?

image

Looking at the script it does not look like to me that is doing that, confirmed also by checking permissions after having run the seeding command.

I guess that then the script should be changed, or docs changed in order to show to run the command as

sudo -u www-data php lizmap/console.php wmts:cache:seed -v -f montpellier montpellier bus EPSG:3857 12 14

gioman avatar Jun 02 '23 10:06 gioman

Another thing that maybe has to be corrected in docs (https://docs.lizmap.com/current/en/admin/cache.html) is the following:

"In this example, you see that the bus layer has 3 different TileMatrixSet, corresponding to the 3 different spatial coordinate systems available for this project in Lizmap (configured in the Project properties ‣ QGIS Server)."

But it seems not 100% correct: my project properties has 3 CRSs listed, 3 from the CRSs represented by layers in the project and 1 added manually

image

but in wmts:capabilities only the first 3 show:

For "sat" and "EPSG:4326" from TileMatrix 0 to 15
For "sat" and "EPSG:5016" from TileMatrix 0 to 10
For "sat" and "EPSG:3857" from TileMatrix 0 to 16

gioman avatar Jun 02 '23 10:06 gioman

One more thing for docs (I can do the PR if you ok this and the above observation):

I feel that it should be clarified that the tiles to be generated for a layer are the ones with the CRS of the project, not the ones with the CRS of the layer. And that new tiles for a different CRS must be eventually generated if the project CRS changes.

Maybe it would be also worth to change the seeding script to generate by default the tiles in the project CRS without having to specify it on the command line (unless it works already like this).

gioman avatar Jun 02 '23 10:06 gioman

Any feedback?

gioman avatar Jun 19 '23 12:06 gioman

Bumping my tickets before they go "quite",

gioman avatar Aug 16 '23 07:08 gioman

@Gustry I would really appreciate any feedback on this matter. A few months have passed and the questions have not been answered and the situation has not improved. I'm on LM 3.6.11

To try start fresh:

  1. by activating

image

in LM plugin, then the folder(s) structure for the cache of the layer is created where configured here

image

but no files are written. Permissions are ok, otherwise the folder would not be created. Both the buttons to erase the cache for the whole repo, or a single layer do work, meaning that the proper folders are delete from the file system.

  1. pre-seeding:

despite diligently following https://docs.lizmap.com/current/en/admin/cache.html#configuring-the-caching-system pre-seeding seems also broken. Example:

sudo -u www-data php lizmap/console.php wmts:capabilities qgisserverdemos recart_exemplo_dgt
For "Edificio__Poligono" and "EPSG:3857" from TileMatrix 0 to 22
For "Edificio__Poligono" and "EPSG:3763" from TileMatrix 0 to 10
For "Area_agricola__florestal_ou_mato" and "EPSG:3857" from TileMatrix 0 to 22
For "Area_agricola__florestal_ou_mato" and "EPSG:3763" from TileMatrix 0 to 10
For "Bing_Satellite" and "EPSG:3857" from TileMatrix 0 to 22
For "Bing_Satellite" and "EPSG:3763" from TileMatrix 0 to 10
php lizmap/console.php wmts:capabilities -v qgisserverdemos recart_exemplo_dgt Bing_Satellite EPSG:3763
For "Bing_Satellite" and "EPSG:3763" the TileMatrix 0 has 1 tiles
For "Bing_Satellite" and "EPSG:3763" the TileMatrix 1 has 4 tiles
For "Bing_Satellite" and "EPSG:3763" the TileMatrix 2 has 9 tiles
For "Bing_Satellite" and "EPSG:3763" the TileMatrix 3 has 24 tiles
For "Bing_Satellite" and "EPSG:3763" the TileMatrix 4 has 60 tiles
For "Bing_Satellite" and "EPSG:3763" the TileMatrix 5 has 308 tiles
For "Bing_Satellite" and "EPSG:3763" the TileMatrix 6 has 1176 tiles
For "Bing_Satellite" and "EPSG:3763" the TileMatrix 7 has 4536 tiles
For "Bing_Satellite" and "EPSG:3763" the TileMatrix 8 has 27720 tiles
For "Bing_Satellite" and "EPSG:3763" the TileMatrix 9 has 110040 tiles
For "Bing_Satellite" and "EPSG:3763" the TileMatrix 10 has 437436 tiles
sudo -u www-data php lizmap/console.php wmts:cache:seed -v -f qgisserverdemos recart_exemplo_dgt Bing_Satellite EPSG:3763 1 2
The TileMatrixSet 'EPSG:3857'!
The TileMatrixSet 'EPSG:3763'!
4 tiles to generate for "Bing_Satellite" "EPSG:3763" "1"
9 tiles to generate for "Bing_Satellite" "EPSG:3763" "2"
13 tiles to generate for "Bing_Satellite" "EPSG:3763" between "1" and "2"
Start generation
================
Error, tile not cached: Bing_Satellite / EPSG:3763 / 1 / 0 / 0
Error, tile not cached: Bing_Satellite / EPSG:3763 / 1 / 0 / 1
Error, tile not cached: Bing_Satellite / EPSG:3763 / 1 / 1 / 0
Error, tile not cached: Bing_Satellite / EPSG:3763 / 1 / 1 / 1
Error, tile not cached: Bing_Satellite / EPSG:3763 / 2 / 1 / 1
Progression: 38%, 5 tiles generated on 13 tiles
Error, tile not cached: Bing_Satellite / EPSG:3763 / 2 / 1 / 2
Error, tile not cached: Bing_Satellite / EPSG:3763 / 2 / 1 / 3
Error, tile not cached: Bing_Satellite / EPSG:3763 / 2 / 2 / 1
Error, tile not cached: Bing_Satellite / EPSG:3763 / 2 / 2 / 2
Error, tile not cached: Bing_Satellite / EPSG:3763 / 2 / 2 / 3
Progression: 76%, 10 tiles generated on 13 tiles
Error, tile not cached: Bing_Satellite / EPSG:3763 / 2 / 3 / 1
Error, tile not cached: Bing_Satellite / EPSG:3763 / 2 / 3 / 2
Error, tile not cached: Bing_Satellite / EPSG:3763 / 2 / 3 / 3
================
End generation

and no tiles are generated.

With your "montpellier" demo project is even worst: after enabling the server cache for some layer, and after generating the capabilities for the service and the layer, the seeding command says there are no layers with cache enabled:

sudo -u www-data php lizmap/console.php wmts:capabilities qgisserverdemos montpellier
For "tramstop" and "EPSG:4326" from TileMatrix 0 to 19
For "tramstop" and "EPSG:3857" from TileMatrix 0 to 20
For "tramway" and "EPSG:4326" from TileMatrix 0 to 19
For "tramway" and "EPSG:3857" from TileMatrix 0 to 20
For "SousQuartiers" and "EPSG:4326" from TileMatrix 0 to 19
For "SousQuartiers" and "EPSG:3857" from TileMatrix 0 to 20
For "Quartiers" and "EPSG:4326" from TileMatrix 0 to 19
For "Quartiers" and "EPSG:3857" from TileMatrix 0 to 20
For "VilleMTP_MTP_Quartiers_2011_4326" and "EPSG:4326" from TileMatrix 2 to 19
For "VilleMTP_MTP_Quartiers_2011_4326" and "EPSG:3857" from TileMatrix 3 to 20
sudo -u www-data php lizmap/console.php wmts:capabilities -v qgisserverdemos montpellier "SousQuartiers" EPSG:3857
For "SousQuartiers" and "EPSG:3857" the TileMatrix 0 has 1 tiles
For "SousQuartiers" and "EPSG:3857" the TileMatrix 1 has 1 tiles
For "SousQuartiers" and "EPSG:3857" the TileMatrix 2 has 1 tiles
For "SousQuartiers" and "EPSG:3857" the TileMatrix 3 has 1 tiles
For "SousQuartiers" and "EPSG:3857" the TileMatrix 4 has 1 tiles
For "SousQuartiers" and "EPSG:3857" the TileMatrix 5 has 1 tiles
For "SousQuartiers" and "EPSG:3857" the TileMatrix 6 has 1 tiles
For "SousQuartiers" and "EPSG:3857" the TileMatrix 7 has 1 tiles
For "SousQuartiers" and "EPSG:3857" the TileMatrix 8 has 1 tiles
For "SousQuartiers" and "EPSG:3857" the TileMatrix 9 has 2 tiles
For "SousQuartiers" and "EPSG:3857" the TileMatrix 10 has 4 tiles
For "SousQuartiers" and "EPSG:3857" the TileMatrix 11 has 4 tiles
For "SousQuartiers" and "EPSG:3857" the TileMatrix 12 has 6 tiles
For "SousQuartiers" and "EPSG:3857" the TileMatrix 13 has 16 tiles
For "SousQuartiers" and "EPSG:3857" the TileMatrix 14 has 42 tiles
For "SousQuartiers" and "EPSG:3857" the TileMatrix 15 has 156 tiles
For "SousQuartiers" and "EPSG:3857" the TileMatrix 16 has 598 tiles
For "SousQuartiers" and "EPSG:3857" the TileMatrix 17 has 2295 tiles
For "SousQuartiers" and "EPSG:3857" the TileMatrix 18 has 8900 tiles
For "SousQuartiers" and "EPSG:3857" the TileMatrix 19 has 35223 tiles
For "SousQuartiers" and "EPSG:3857" the TileMatrix 20 has 140538 tiles
sudo -u www-data php lizmap/console.php wmts:cache:seed -v -f qgisserverdemos montpellier "SousQuartiers" EPSG:3857 1 9
No layers configured with cache!

Anything that would help understand if the issue is on my side or not would be appreciated.

Bonus question:

Imagining that caching is working (which is not for me on any setup I tried), what has the priority about expiration time, this in LMWC backend

image

or this in LM plugin

image

?

gioman avatar Apr 09 '24 22:04 gioman

I changed the title because now cache and seeding are not working regardless of the source/type of layer.

gioman avatar Apr 09 '24 22:04 gioman

Same for me, Lizmap can't cache tiles. The directory cache structure is created but no tiles are cached (manually or using seeding).

php lizmap/console.php wmts:capabilities mon_projet monprojet
For "orthophotos-974-2022_cog_tif" and "EPSG:2975" from TileMatrix 0 to 21
php lizmap/console.php wmts:capabilities -v mon_projet monprojet "orthophotos-974-2022_cog_tif" "EPSG:2975"
For "orthophotos-974-2022_cog_tif" and "EPSG:2975" the TileMatrix 0 has 16 tiles
For "orthophotos-974-2022_cog_tif" and "EPSG:2975" the TileMatrix 1 has 25 tiles
For "orthophotos-974-2022_cog_tif" and "EPSG:2975" the TileMatrix 2 has 120 tiles
For "orthophotos-974-2022_cog_tif" and "EPSG:2975" the TileMatrix 3 has 440 tiles
For "orthophotos-974-2022_cog_tif" and "EPSG:2975" the TileMatrix 4 has 1680 tiles
For "orthophotos-974-2022_cog_tif" and "EPSG:2975" the TileMatrix 5 has 10192 tiles
For "orthophotos-974-2022_cog_tif" and "EPSG:2975" the TileMatrix 6 has 40572 tiles
For "orthophotos-974-2022_cog_tif" and "EPSG:2975" the TileMatrix 7 has 162288 tiles
For "orthophotos-974-2022_cog_tif" and "EPSG:2975" the TileMatrix 8 has 1013320 tiles
For "orthophotos-974-2022_cog_tif" and "EPSG:2975" the TileMatrix 9 has 1583925 tiles
For "orthophotos-974-2022_cog_tif" and "EPSG:2975" the TileMatrix 10 has 4049253 tiles
php lizmap/console.php wmts:cache:seed -v -f mon_projet monprojet "orthophotos-974-2022_cog_tif" "EPSG:2975" 1 1
The TileMatrixSet 'EPSG:3857'!
The TileMatrixSet 'EPSG:2975'!
25 tiles to generate for "orthophotos-974-2022_cog_tif" "EPSG:2975" "1"
25 tiles to generate for "orthophotos-974-2022_cog_tif" "EPSG:2975" between "1" and "1"
Start generation
================
Error, tile not cached: orthophotos-974-2022_cog_tif / EPSG:2975 / 1 / 0 / 0
Error, tile not cached: orthophotos-974-2022_cog_tif / EPSG:2975 / 1 / 0 / 1
Error, tile not cached: orthophotos-974-2022_cog_tif / EPSG:2975 / 1 / 0 / 2
Error, tile not cached: orthophotos-974-2022_cog_tif / EPSG:2975 / 1 / 0 / 3
Error, tile not cached: orthophotos-974-2022_cog_tif / EPSG:2975 / 1 / 0 / 4
Progression: 20%, 5 tiles generated on 25 tiles
Error, tile not cached: orthophotos-974-2022_cog_tif / EPSG:2975 / 1 / 1 / 0
Error, tile not cached: orthophotos-974-2022_cog_tif / EPSG:2975 / 1 / 1 / 1
Error, tile not cached: orthophotos-974-2022_cog_tif / EPSG:2975 / 1 / 1 / 2
Error, tile not cached: orthophotos-974-2022_cog_tif / EPSG:2975 / 1 / 1 / 3
Error, tile not cached: orthophotos-974-2022_cog_tif / EPSG:2975 / 1 / 1 / 4
Progression: 40%, 10 tiles generated on 25 tiles
Error, tile not cached: orthophotos-974-2022_cog_tif / EPSG:2975 / 1 / 2 / 0
Error, tile not cached: orthophotos-974-2022_cog_tif / EPSG:2975 / 1 / 2 / 1
Error, tile not cached: orthophotos-974-2022_cog_tif / EPSG:2975 / 1 / 2 / 2
Error, tile not cached: orthophotos-974-2022_cog_tif / EPSG:2975 / 1 / 2 / 3
Error, tile not cached: orthophotos-974-2022_cog_tif / EPSG:2975 / 1 / 2 / 4
Progression: 60%, 15 tiles generated on 25 tiles
Error, tile not cached: orthophotos-974-2022_cog_tif / EPSG:2975 / 1 / 3 / 0
Error, tile not cached: orthophotos-974-2022_cog_tif / EPSG:2975 / 1 / 3 / 1
Error, tile not cached: orthophotos-974-2022_cog_tif / EPSG:2975 / 1 / 3 / 2
Error, tile not cached: orthophotos-974-2022_cog_tif / EPSG:2975 / 1 / 3 / 3
Error, tile not cached: orthophotos-974-2022_cog_tif / EPSG:2975 / 1 / 3 / 4
Progression: 80%, 20 tiles generated on 25 tiles
Error, tile not cached: orthophotos-974-2022_cog_tif / EPSG:2975 / 1 / 4 / 0
Error, tile not cached: orthophotos-974-2022_cog_tif / EPSG:2975 / 1 / 4 / 1
Error, tile not cached: orthophotos-974-2022_cog_tif / EPSG:2975 / 1 / 4 / 2
Error, tile not cached: orthophotos-974-2022_cog_tif / EPSG:2975 / 1 / 4 / 3
Error, tile not cached: orthophotos-974-2022_cog_tif / EPSG:2975 / 1 / 4 / 4
Progression: 100%, 25 tiles generated on 25 tiles
================
End generation

arno974 avatar Apr 12 '24 07:04 arno974

but no tiles are cached (manually or using seeding).

thanks for confirming.

gioman avatar Apr 12 '24 12:04 gioman

Thanks for trying. There is some unit tests about this CLI tool done automatically :

https://github.com/3liz/lizmap-web-client/blob/master/tests/end2end/cypress/integration/cmdline-wmts-ghaction.js

The storage backend is Redis, not file based. It's checking exit code and STD out.

No redis user ?

Gustry avatar Apr 12 '24 13:04 Gustry

No redis user ?

@Gustry thanks for the reply. For many simple use cases Redis seems an overkill to me, but if it works... should we assume that at this moment file based caching is broken?

gioman avatar Apr 12 '24 13:04 gioman

Morever, does not Redis now pose a problem from a licensing point of view, at least for some potential LMWC user?

gioman avatar Apr 12 '24 15:04 gioman

@Gustry no changes after configuring LMWC to use Redis

sudo -u www-data php lizmap/console.php wmts:cache:seed -v -f qgisserverdemos recart_exemplo_dgt Bing_Satellite EPSG:3763 1 2
The TileMatrixSet 'EPSG:3857'!
The TileMatrixSet 'EPSG:3763'!
4 tiles to generate for "Bing_Satellite" "EPSG:3763" "1"
9 tiles to generate for "Bing_Satellite" "EPSG:3763" "2"
13 tiles to generate for "Bing_Satellite" "EPSG:3763" between "1" and "2"
Start generation
================
Error, tile not cached: Bing_Satellite / EPSG:3763 / 1 / 0 / 0
Error, tile not cached: Bing_Satellite / EPSG:3763 / 1 / 0 / 1
Error, tile not cached: Bing_Satellite / EPSG:3763 / 1 / 1 / 0
Error, tile not cached: Bing_Satellite / EPSG:3763 / 1 / 1 / 1
Error, tile not cached: Bing_Satellite / EPSG:3763 / 2 / 1 / 1
Progression: 38%, 5 tiles generated on 13 tiles
Error, tile not cached: Bing_Satellite / EPSG:3763 / 2 / 1 / 2
Error, tile not cached: Bing_Satellite / EPSG:3763 / 2 / 1 / 3
Error, tile not cached: Bing_Satellite / EPSG:3763 / 2 / 2 / 1
Error, tile not cached: Bing_Satellite / EPSG:3763 / 2 / 2 / 2
Error, tile not cached: Bing_Satellite / EPSG:3763 / 2 / 2 / 3
Progression: 76%, 10 tiles generated on 13 tiles
Error, tile not cached: Bing_Satellite / EPSG:3763 / 2 / 3 / 1
Error, tile not cached: Bing_Satellite / EPSG:3763 / 2 / 3 / 2
Error, tile not cached: Bing_Satellite / EPSG:3763 / 2 / 3 / 3
================
End generation

gioman avatar Apr 12 '24 15:04 gioman

And same thing with SQLITE.

gioman avatar Apr 12 '24 15:04 gioman

@Gustry no changes after configuring LMWC to use Redis

127.0.0.1:6379> KEYS *
(empty array)
127.0.0.1:6379> MONITOR
OK

Nothing moves into Redis when navigating a project that has a few layers set with server cache.

gioman avatar Apr 12 '24 15:04 gioman