[Lizmap] Lizmap/qgis server : cache management (seeding)

Etienne Trimaille etrimaille at 3liz.com
Tue May 16 03:50:34 PDT 2023


Hi,

 > I am a little surprised by the poor performance that I can observe 
currently

Just to add some context, there can be many bottlenecks, and it can be 
at different levels :

- physical server : RAM CPU etc

- server configuration : environment variables used, settings, parallel 
rendering etc ...

- project configuration : use estimated metadata, settings etc

- layer configuration : storage in PG ? spatial index, use server side 
simplification for the rendering if possible ? estimated metadata, 
complexity of the GIS geometries ?


Not really bringing a solution, just a few things to check. You can 
check also in QGIS Desktop, how much time does the project take to open 
? You can have a look with the QGIS debug panel for project loading time.


 > I'm surprised to not read in the environment summary logs, the new 
enviro variables 'FcgidInitialEnv QGIS_SERVER_PARALLEL_RENDERING' and 
'FcgidInitialEnv QGIS_SERVER_CACHE_DIRECTORY'


You are showing us logs about "New request" coming as it's written.

Global QGIS server environment variables are written when the server is 
starting only.

See how it looks : in the documentation 
https://docs.qgis.org/3.28/en/docs/server_manual/config.html#settings-summary


Regards,


On 16/05/2023 12:08, celati Laurent wrote:
> Good morning,
>
> Thanks for your message, i have currently one only Qgis server 
> installed/available.
> Sorry but what do you mean by "enhance the number of QGIS Server 
> available ?"
>
> Following to my previous message, regarding my initial and main issue, 
> For information, when i do :
>
> php lizmap/console.php project:load
> i get :
> //var/www/lizmap/lizmap-web-client-3.6.3# php lizmap/console.php 
> project:load Enter the repository lizmaptest Get the project zios 1 
> request(s) return success for the project zios Enter the repository 
> aero Get the project aero_v2 1 request(s) return success for the 
> project aero_v2 Enter the repository dr0 Get the project forages 1 
> request(s) return success for the project forages Get the project 
> forages_2154 1 request(s) return success for the project forages_2154 
> Get the project dr0 1 request(s) return success for the project dr0 
> Get the project forages_2154_with_fond 1 request(s) return success for 
> the project forages_2154_with_fond/
> //
> /But when i do : /
> /php lizmap/console.php wmts:capabilities -v dr0 forages_2154 No 
> layers configured with cache!/
> //
> /Do you know where the problem comes from ?/
> In parrarel, always with the aim of improving performance, i tried to edit my vhost apache in adding :
> FcgidInitialEnv QGIS_SERVER_PARALLEL_RENDERING "1"
> and
> FcgidInitialEnv QGIS_SERVER_CACHE_DIRECTORY "/tmp/"
> (Is it a good idea or i should rather keep the default value ('cache in profile directory') ?
> i setted this path because into my lizmap cache config i noticed : cache root directory :  /tmp/)
> Still in parralel, I discovered the existence of these 2 qgis server plugins. Would it be adviced to installing them?
> https://github.com/3liz/qgis-server-wmts-cache-plugin
> https://github.com/3liz/qgis-server-tiles-plugin
>
> Eventually, I'm taking the liberty to paste below an update of my qgis server logs :
> I'm surprised to not read in the environment summary logs, the new enviro variables 'FcgidInitialEnv QGIS_SERVER_PARALLEL_RENDERING'
> and 'FcgidInitialEnv QGIS_SERVER_CACHE_DIRECTORY'
> How to ensure that the cache server is functional and taken into account?
> 11:30:43 INFO Server[919778]: ******************** New request 
> *************** 11:30:43 INFO Server[919778]: Request URL: 
> http://sig-rec.andra.fr/cgi-bin/qgis_mapserv.fcgi/lizmap/server.json 
> 11:30:43 INFO Server[919778]: Environment: 11:30:43 INFO 
> Server[919778]: ------------------------------------------------ 
> 11:30:43 INFO Server[919778]: SERVER_NAME: sig-rec.andra.fr 
> <http://sig-rec.andra.fr> 11:30:43 INFO Server[919778]: REQUEST_URI: 
> /cgi-bin/qgis_mapserv.fcgi/lizmap/server.json 11:30:43 INFO 
> Server[919778]: SCRIPT_NAME: /cgi-bin/qgis_mapserv.fcgi 11:30:43 INFO 
> Server[919778]: PATH_INFO: /lizmap/server.json 11:30:43 INFO 
> Server[919778]: REMOTE_ADDR: 192.168.4.7 11:30:43 INFO Server[919778]: 
> SERVER_PORT: 80 11:30:43 INFO Server[919778]: QUERY_STRING: 11:30:43 
> INFO Server[919778]: REQUEST_METHOD: GET 11:30:43 INFO Server[919778]: 
> QGIS_PROJECT_FILE: /home/qgis/projects/world.qgs 11:30:43 INFO 
> Server[919778]: SERVER_PROTOCOL: HTTP/1.1 11:30:43 INFO 
> Server[919778]: Using configuration file path from environment: 
> /home/qgis/projects/world.qgs 11:30:43 INFO Lizmap[919778]: Request 
> headers provided 11:30:43 INFO Lizmap[919778]: No lizmap user groups 
> in request headers 11:30:43 INFO Server[919778]: Using configuration 
> file path from environment: /home/qgis/projects/world.qgs 11:30:43 
> INFO Server[919778]: Trying URL path: 
> '/cgi-bin/qgis_mapserv.fcgi/lizmap/server.json' for '/lizmap' 11:30:43 
> INFO Server[919778]: API Lizmap accepts the URL path 
> '/cgi-bin/qgis_mapserv.fcgi/lizmap/server.json' 11:30:43 INFO 
> Server[919778]: Checking API path /server.json for server.json 
> 11:30:43 INFO Server[919778]: API Lizmap: found handler server 
> 11:30:43 CRITICAL Server[919778]: Service ATLAS is not registered 
> 11:30:43 CRITICAL Server[919778]: Service CADASTRE is not registered 
> 11:30:43 INFO Server[919778]: Request finished in 6 ms
>
> Thans a lot again for your usefull help ans support.
>
>
> Le lun. 15 mai 2023 à 15:40, celati Laurent <laurent.celati at gmail.com> 
> a écrit :
>
>     Hi, thanks,
>     Probably not. Should i set additional environment variables in my
>     apache vhost ?
>     (MAX_CACHE_LAYERS, QGIS_SERVER_PARALLEL_RENDERING, QGIS_SERVER_MAX_THREADS,
>     QGIS_SERVER_MAX_THREADS,QGIS_SERVER_CACHE_SIZE, QGIS_SERVER_WMS_MAX_HEIGHT
>     / QGIS_SERVER_WMS_MAX_WIDTH)
>
>     Below, a part of my parameters qgis server log (summary) :
>
>     14:10:05 INFO Server[907652]: ******************** New request
>     ***************
>
>     14:10:05 INFO Server[907652]: Request URL:
>     http://xxxx-xxx.xxxx.fr/cgi-bin/qgis_mapserv.fcgi?map=%2Fhome%2Fdata%2Fftp%2Ftemplate%2Fqgis%2Flizmap_test%2FDR0%2Fforages_2154.qgs&request=GetCapabilities&service=WMS&version=1.3.0&Lizmap_User=&Lizmap_User_Groups=
>     <http://xxxx-xxx.xxxx.fr/cgi-bin/qgis_mapserv.fcgi?map=%2Fhome%2Fdata%2Fftp%2Ftemplate%2Fqgis%2Flizmap_test%2FDR0%2Fforages_2154.qgs&request=GetCapabilities&service=WMS&version=1.3.0&Lizmap_User=&Lizmap_User_Groups=>
>
>     14:10:05 INFO Server[907652]: Environment:
>
>     14:10:05 INFO Server[907652]:
>     ------------------------------------------------
>
>     14:10:05 INFO Server[907652]: SERVER_NAME: xxxxx.xxxx.fr
>     <http://xxxxx.xxxx.fr>
>
>     14:10:05 INFO Server[907652]: REQUEST_URI:
>     /cgi-bin/qgis_mapserv.fcgi?map=%2Fhome%2Fdata%2Fftp%2Ftemplate%2Fqgis%2Flizmap%5Ftest%2FDR0%2Fforages%5F2154%2Eqgs&request=GetCapabilities&service=WMS&version=1%2E3%2E0&Lizmap%5FUser=&Lizmap%5FUser%5FGroups=
>
>     14:10:05 INFO Server[907652]: SCRIPT_NAME: /cgi-bin/qgis_mapserv.fcgi
>
>     14:10:05 INFO Server[907652]: REMOTE_ADDR: 192.168.4.7
>
>     14:10:05 INFO Server[907652]: SERVER_PORT: 80
>
>     14:10:05 INFO Server[907652]: QUERY_STRING:
>     map=%2Fhome%2Fdata%2Fftp%2Ftemplate%2Fqgis%2Flizmap%5Ftest%2FDR0%2Fforages%5F2154%2Eqgs&request=GetCapabilities&service=WMS&version=1%2E3%2E0&Lizmap%5FUser=&Lizmap%5FUser%5FGroups=
>
>     14:10:05 INFO Server[907652]: REQUEST_METHOD: GET
>
>     14:10:05 INFO Server[907652]: QGIS_PROJECT_FILE:
>     /home/qgis/projects/world.qgs
>
>     14:10:05 INFO Server[907652]: SERVER_PROTOCOL: HTTP/1.1
>
>     14:10:05 INFO Lizmap[907652]: Request headers provided
>
>     14:10:05 INFO Lizmap[907652]: No lizmap user groups in request headers
>
>     14:10:05 INFO Lizmap[907652]: Lizmap user groups in parameters :
>
>     14:10:05 INFO Lizmap[907652]: Fetching
>     /home/data/ftp/template/qgis/lizmap_test/DR0/forages_2154.qgs.cfg
>     cfg file with last modified timestamp : 1684152008.8653688
>
>     14:10:05 INFO Lizmap[907652]: No acl defined in Lizmap config
>
>     14:10:05 INFO Server[907652]: LIZMAP_USER:
>
>     14:10:05 INFO Server[907652]: LIZMAP_USER_GROUPS:
>
>     14:10:05 INFO Server[907652]:
>     MAP:/home/data/ftp/template/qgis/lizmap_test/DR0/forages_2154.qgs
>
>     14:10:05 INFO Server[907652]: REQUEST:GetCapabilities
>
>     14:10:05 INFO Server[907652]: SERVICE:WMS
>
>     14:10:05 INFO Server[907652]: VERSION:1.3.0
>
>     14:10:05 INFO Lizmap[907652]: Request headers provided
>
>     14:10:05 INFO Lizmap[907652]: No lizmap user groups in request headers
>
>     14:10:05 INFO Lizmap[907652]: Lizmap user groups in parameters :
>
>     14:10:05 INFO Lizmap[907652]: Fetching
>     /home/data/ftp/template/qgis/lizmap_test/DR0/forages_2154.qgs.cfg
>     cfg file with last modified timestamp : 1684152008.8653688
>
>     14:10:05 INFO Lizmap[907652]: Request headers provided
>
>     14:10:05 INFO Lizmap[907652]: No lizmap user groups in request headers
>
>     14:10:05 INFO Lizmap[907652]: Lizmap user groups in parameters :
>
>     14:10:05 INFO Lizmap[907652]: Fetching
>     /home/data/ftp/template/qgis/lizmap_test/DR0/forages_2154.qgs.cfg
>     cfg file with last modified timestamp : 1684152008.8653688
>
>     14:10:05 WARNING Server[907652]: Found WMS capabilities document
>     in cache
>
>     14:10:05 INFO Server[907652]: Request finished in 8 ms
>
>
>     Le lun. 15 mai 2023 à 15:11, Giovanni Manghi
>     <giovanni.manghi at naturalgis.pt> a écrit :
>
>         Hi,
>
>
>             On debian/apache, I succeed in installing qgis server and
>             lizmap. I am a little surprised by the poor performance
>             that I can observe currently.
>
>
>
>         Have you enabled (QGIS Server) parallel rendering in your
>         Apache/Ngnix configs?
>
>         -- G --
>
>
> _______________________________________________
> Lizmap mailing list
> Lizmap at lists.osgeo.org
> https://lists.osgeo.org/mailman/listinfo/lizmap
-- 

Etienne Trimaille
Géomaticien
www.3liz.com <http://www.3liz.com>

*Tel.* 06 12 93 11 39
*Bureau*
31, rue de l'Argenterie
34000 Montpellier
*Siège social*
73, allée Kleber
Boulevard de Strasbourg
34000 Montpellier

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/lizmap/attachments/20230516/47ce3890/attachment-0001.htm>


More information about the Lizmap mailing list