3liz / py-qgis-server

QGIS embbeded WMS/WFS/WCS asynchronous scalable http server
https://docs.3liz.org/py-qgis-server
Mozilla Public License 2.0
68 stars 16 forks source link

Workers update sequentially #66

Closed lassitanskanen closed 1 year ago

lassitanskanen commented 1 year ago

Hi,

If apply updates to qgis project all workers will update it same time to LRU or static cache. Is it possible to update with delay between workers? In other words, rolling updates.

dmarteau commented 1 year ago

Actually no, each worker manage its own cache and update it.

What would be the point/use case to perform a rolling update ?

lassitanskanen commented 1 year ago

Large qgis projects that takes long to load to cache. Enchantment for updates handling.

dmarteau commented 1 year ago

large qgis projects that takes long to load to cache

Interesting but, at first glance, not so easy to implement since workers manage cache independently from each other.

lassitanskanen commented 1 year ago

Could 0MQ push update requests to workers?

dmarteau commented 1 year ago

Yes, in theory that would be possible, from the supervisor process that manage the worker pool, this will implies some refactoring of the cache.

The undesirable side effect that I see is that during the rolling the server may returns different responses depending on which worker is updated: if you do some map or vector tile requests or manage some compositing with WMS requests, you may end with a complete mess with your final result.

dmarteau commented 1 year ago

Anyway, this would be a workaround to the inherent fact that Qgis server has a serious problem with project loading performances. This a known issue and there is work in progress abount this issue.

At least, you may try QGIS_SERVER_TRUST_LAYER_METADATA, QGIS_SERVER_FORCE_READONLY_LAYERS (Qgis >=3.28) and if you do not use GetPrint requests, disable loading composer data with QGIS_SERVER_DISABLE_GETPRINT: it may improve your loading time.

dmarteau commented 1 year ago

FYI: https://github.com/qgis/QGIS/pull/53069

github-actions[bot] commented 1 year ago

This issue is stale because it has been open for 30 days with no activity.

github-actions[bot] commented 1 year ago

This issue was closed because it has been inactive for 14 days since being marked as stale.