0

I am experiencing very slow requests on Ubuntu 18.04 running QGIS server 3.4.8. All requests, ie. GetPrint, GetLegendGraphics etc takes from 500ms to many seconds. I know bigger requests can take a while, but even small simple requests takes a long time. This happened a couple of months ago, and for no obvious reason. Also, python plugins are failing occasionally.

The strange thing is that I installed a brand new server with newer QGIS server version, and the problem was still present.

I don't know if it is normal, but in the log file the qgis server seems to initialize for every request, and also loading python and plugins. This happens before almost each request:

21:49:15 INFO Server[118392]: Qgis Server Settings:
21:49:15 INFO Server[118392]: - QGIS_OPTIONS_PATH / '' (Override the default path for user configuration): '' (read from DEFAULT_VALUE)
21:49:15 INFO Server[118392]: - QGIS_SERVER_PARALLEL_RENDERING / '/qgis/parallel_rendering' (Activate/Deactivate parallel rendering for WMS getMap request): '1' (read from ENVIRONMENT_VARIABLE) 21:49:15 INFO Server[118392]: - QGIS_SERVER_MAX_THREADS / '/qgis/max_threads' (Number of threads to use when parallel rendering is activated): '4' (read from ENVIRONMENT_VARIABLE)
21:49:15 INFO Server[118392]: - QGIS_SERVER_LOG_LEVEL / '' (Log level): '0' (read from ENVIRONMENT_VARIABLE)
21:49:15 INFO Server[118392]: - QGIS_SERVER_LOG_FILE / '' (Log file): '/home/user/qgis_server_logging/qgislog.txt' (read from ENVIRONMENT_VARIABLE)
21:49:15 INFO Server[118392]: - QGIS_SERVER_LOG_STDERR / '' (Activate/Deactivate logging to stderr): 'false' (read from DEFAULT_VALUE)
21:49:15 INFO Server[118392]: - QGIS_PROJECT_FILE / '' (QGIS project file): '' (read from DEFAULT_VALUE)
21:49:15 INFO Server[118392]: - MAX_CACHE_LAYERS / '' (Specify the maximum number of cached layers): '100' (read from DEFAULT_VALUE)
21:49:15 INFO Server[118392]: - QGIS_SERVER_CACHE_DIRECTORY / '/cache/directory' (Specify the cache directory): '//.local/share/QGIS/QGIS3/profiles/default/cache' (read from DEFAULT_VALUE)
21:49:15 INFO Server[118392]: - QGIS_SERVER_CACHE_SIZE / '/cache/size' (Specify the cache size): '52428800' (read from DEFAULT_VALUE)
21:49:15 INFO Server[118392]: - QGIS_SERVER_SHOW_GROUP_SEPARATOR / '/locale/showGroupSeparator' (Show group (thousands) separator): 'false' (read from DEFAULT_VALUE)
21:49:15 INFO Server[118392]: - QGIS_SERVER_OVERRIDE_SYSTEM_LOCALE / '/locale/userLocale' (Override system locale): '' (read from DEFAULT_VALUE)
21:49:15 INFO Server[118392]: Ini file used to initialize settings: /.local/share/QGIS/QGIS3/profiles/default/QGIS/QGIS3.ini
21:49:15 INFO Server[118392]: cacheDirectory: /.local/share/QGIS/QGIS3/profiles/default/cache/
21:49:15 INFO Server[118392]: maximumCacheSize: 52428800
21:49:15 INFO Server[118392]: Prefix PATH: /usr
21:49:15 INFO Server[118392]: Plugin PATH: /usr/lib/qgis/plugins
21:49:15 INFO Server[118392]: PkgData PATH: /usr/share/qgis
21:49:15 INFO Server[118392]: User DB PATH: //.local/share/QGIS/QGIS3/profiles/default/qgis.db
21:49:15 INFO Server[118392]: Auth DB PATH: //.local/share/QGIS/QGIS3/profiles/default/qgis-auth.db 21:49:15 INFO Server[118392]: SVG PATHS: /usr/share/qgis/svg/://.local/share/QGIS/QGIS3/profiles/default/svg/
21:49:15 WARNING [118392]: Adding service SampleService 1.0
21:49:15 WARNING [118392]: Adding service WCS 1.0.0
21:49:15 WARNING [118392]: Adding service WFS 1.1.0
21:49:15 WARNING [118392]: Adding service WMS 1.3.0
21:49:15 WARNING [118392]: Adding service WMTS 1.0.0
21:49:15 INFO Server[118392]: Server initialized
21:49:15 INFO ../../src/server/qgsserverplugins.cpp[118392]: load library /usr/lib/qgispython (3.4.8) 21:49:15 INFO ../../src/server/qgsserverplugins.cpp[118392]: Python support library loaded successfully. 21:49:15 INFO [118392]: GeonordExpression --> getMapExtent register: False
21:49:15 INFO Server[118392]: Server plugin GeoNord_expr_func loaded!
21:49:15 INFO Server[118392]: Server python plugins loaded
21:49:15 INFO Server[118392]: ******************** New request ***************

On one occasion this happened multiple times simultaneously, initializing server and loading python plugins. I am also thinking maybe Apache could be cause of this. I have another PHP site running on same server but this is working very fast. Is this initializing the problem and what could possibly be the cause?

Your Answer

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

Browse other questions tagged or ask your own question.