Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Caching capabilities with PostgreSQL layer #4476

Open
1 task
Oxsw1ng opened this issue May 24, 2024 · 8 comments
Open
1 task

Caching capabilities with PostgreSQL layer #4476

Oxsw1ng opened this issue May 24, 2024 · 8 comments

Comments

@Oxsw1ng
Copy link

Oxsw1ng commented May 24, 2024

What is the question? (in English)

Hello !
To begin with, I'm sorry if I'm unclear about this issue, English is not my native language and I've started using Lizmap during my internship.
So, I wanted to optimize my Lizmap project, because it was so slow, even with few layers. I wanted to try to use the server cache or the browser cache.
I've unticked single tile and ticked Server tile cached for all my layers.
When I now open my Lizmap project, I cant see that only one layer has a cache, which is an OpenStreetMap layer. The other ones are all vector layers.
When I want to use php lizmap/console.php wmts:capabilities <repository> <project>, it only shows me the capabilities of the OSM layer.
Now I still want to generate the cache for this layer, but when using php lizmap/console.php wmts:cache:seed <repository> <project> <myOSMlayer> <TileMatrixSet> <TileMatrixMin> <TileMatrixMax>, I get this for EACH tile :

Error, tile not cached

If I go into my cache repository, I can see a repository matching my repository and my project in Lizmap, and there is a repository for each layer.
So, I don't have any hints to how to solve my problem because I've looked all issues already existing and I dont thing that someone already got this issue.

Environnement

LWC 3.7.6
QGIS Server 3.22.16
Lizmap Server 2.9.0
QGIS Desktop 3.36.2

Im using Apache as a server.

Versions, safeguards, check summary etc

Versions :

  • Lizmap Web Client : 3.7.6
  • Lizmap plugin : 4.3.12
  • QGIS Desktop : 3.36.2
  • QGIS Server and plugins unknown status because the login provided is not an administrator
List of safeguards :
  • Mode : safe
  • Allow parent folder : no
  • Prevent other drive : yes
  • Prevent PG service : yes
  • Prevent PG Auth DB : yes
  • Force PG user&pass : yes
  • Prevent ECW : yes

Check Lizmap plugin

  • 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.

Operating system

Debian 12

Browsers

Firefox

Browsers version

Firefox 126

Relevant log output

No response

@Oxsw1ng
Copy link
Author

Oxsw1ng commented May 31, 2024

There's a little update about this !

So, as I can say after trying different solutions, PostGIS layers can't be saved in cache, but vector layers can.
So I need to choose between the swiftness of Lizmap or the usability of Lizmap. So I dont know if you have some optimizations for PostGIS layers to make it faster ? (except some SQL requests improvments because it didn't made it faster for me)

@Oxsw1ng Oxsw1ng closed this as completed Jun 10, 2024
@gioman
Copy link
Contributor

gioman commented Jun 14, 2024

PostGIS layers can't be saved in cache, but vector layers can.

@Oxsw1ng not sure I understand, can you elaborate? Sorry for asking, this is something that I think is also affecting me.

@Oxsw1ng
Copy link
Author

Oxsw1ng commented Jun 14, 2024

PostGIS layers can't be saved in cache, but vector layers can.

@Oxsw1ng not sure I understand, can you elaborate? Sorry for asking, this is something that I think is also affecting me.

Hum if I understood well how caching works, you cant cache a Postgis layer, because when you generate capabilities for the project, you dont see the PostGis layers, which technically means you cant generate cache for it.
I think it can be explained because the PostGis layers are supposed to change often, so they decided to not activate caching on these layers.

@gioman
Copy link
Contributor

gioman commented Jun 14, 2024

because when you generate capabilities for the project, you dont see the PostGis layers

@Oxsw1ng I guess you mean this, right?

image

If the above script/command really does not list postgis layers I would assume that is a bug, I highly doubt that postgis layers were excluded by design.

@Oxsw1ng
Copy link
Author

Oxsw1ng commented Jun 14, 2024

Yeah, this is what I meant. I cant really tell you if this is a bug or not, because I had so many issues concerning cache, but maybe you're right, it is.

@gioman
Copy link
Contributor

gioman commented Jun 16, 2024

@Oxsw1ng this adds up to my ticket #3696 where I placed a few observations on caching along time, but that didn't get much attention.

@gioman
Copy link
Contributor

gioman commented Jun 16, 2024

@Oxsw1ng this should be reopened, it is a valid issue as there is no real reason why PostGIS layers should be cached (as PostGIS is one of the pillars for LMWC).

@Oxsw1ng Oxsw1ng reopened this Jun 17, 2024
@Oxsw1ng
Copy link
Author

Oxsw1ng commented Jun 17, 2024

@gioman yeah you're right

@Gustry Gustry changed the title [Question]: Server/Browser Cache Issues Caching capabilities with PostgreSQL layer Jun 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants