Giter Site home page Giter Site logo

Comments (12)

dmarteau avatar dmarteau commented on June 15, 2024 1

The docker compose use a Redis cache.

BUT: if you want to persits your cache you need to mount the redis db outside the container or in a named volume.

You may also modify the LIZMAP_CACHESTORAGETYPE to whatever storage type you want (You should refer to the Lizmap documentation about possible values)

refs:

  • About Redis persistent storage on https://hub.docker.com/_/redis/
  • About docker volumes

from lizmap-docker-compose.

Doctor-Who avatar Doctor-Who commented on June 15, 2024

Thank you David

A la prochaine ;)

from lizmap-docker-compose.

Doctor-Who avatar Doctor-Who commented on June 15, 2024

I'm reopening the issue because something went wrong and I cannot explain.
I'm modify docker compose to set redis persistant

  redis:
    image: redis:5
    command: ["redis-server", "--appendonly", "yes"]
    volumes:
      - ./lizmap/redis-data/:/data
    restart: unless-stopped

When I'm launching script.php seeding for tile generation, file named appendonly.aof is growing but RAM too.
After one night seeding, my file is only 2.7 G but RAM (187 G) and swap (150 G) are full.
I've got error following in the container lizmap_lizmap :
Error for tile: 75_nouvelle_aquitaine_2020_cog / EPSG:2154 / 5 / 61 / 673
Error, tile not cached: 75_nouvelle_aquitaine_2020_cog / EPSG:2154 / 5 / 61 / 673

So I've restarted container lizmap_map (qgis server) and swap and ram get empty.
I'm quite confusing of this result why the appendonly.aof is only 2.7 G and the rest seems store in RAM / SWAP ?

Thanks for your advice

from lizmap-docker-compose.

dmarteau avatar dmarteau commented on June 15, 2024

I don't known what the script do and what is the Lizmap error about, but you must know that ther is several cache involved: the cache that may grow is may be the Qgis/Gdal cache from py-qgis-server and depends on things like: the number of projets/layer and the number of configured worker (workers are not sharing data, they are independant processes) and the maximum number of project that Qgis/py-qgis-server that each worker may cache.

from lizmap-docker-compose.

Doctor-Who avatar Doctor-Who commented on June 15, 2024

Ok understanding, even if the memory cache size was fixed since QGIS server 3.12 (old discussion foss4G 2019)
So I need to retry by reduce or disable the QGSRV_CACHE_SIZE: 'x'
Can you tell me if 0 means no limit or disable ?

from lizmap-docker-compose.

dmarteau avatar dmarteau commented on June 15, 2024

No, you cannot disable it or set it unlimited. It is 10 by default but if you have projects with many layers maybe should lesser that number.

from lizmap-docker-compose.

Doctor-Who avatar Doctor-Who commented on June 15, 2024

Ok thanks for answer, Problem I think is that I've got a orthophotograpghy regional scale at 20 cm.

from lizmap-docker-compose.

Doctor-Who avatar Doctor-Who commented on June 15, 2024

I will try to generate step step, one layer once with one scale level.
A relevant features would be to force cache in the the cache file system (redis persistant or filesystem) when using php script for seeding.
Otherwise it won't be suitable for production :(

from lizmap-docker-compose.

dmarteau avatar dmarteau commented on June 15, 2024

A relevant features would be to force cache in the the cache file system (redis persistant or filesystem) when using php script for seeding.

This is a cache configuration issue, note that redis is persistent if your configuration make it so (persistent data volume, but afaik redis store all data in RAM and flush periodically to disk.

So if you have cached material that may exceed your ram you will have to change your cache strategy: use redis distributed cache or configure lizmap to use file cache storage instead of Redis.

from lizmap-docker-compose.

Doctor-Who avatar Doctor-Who commented on June 15, 2024

Last feedback : I've try on several type of layers.
This happen only for raster (even small ones)
Cache generation with vector works and stored into Redis even with a large amount of polygon 1.5 millions
but not working fine with Raster

from lizmap-docker-compose.

dmarteau avatar dmarteau commented on June 15, 2024

Cache generation with vector works and stored into Redis even wit

Afaik the redis cache only raster rendering from lizmap (i.e getmap request), not vectorized objects so its less than probable that the issue is about raster vs vector.

Note that a cache used for caching arbitrary sized getmap request is totally inefficient as you will cache a lot of overlapping regions. Consider using a cache if your are using tile rendering.

I really think you will have better et more complete answers if you ask questions about cache directly at the Lizmap team as the cache usage is completely driven by the Lizmap service.

from lizmap-docker-compose.

Doctor-Who avatar Doctor-Who commented on June 15, 2024

You're right, it's about cache generation with PHP command from Lizmap.
I will open new issue on the right project.
Thanks for your help.

from lizmap-docker-compose.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.