lizmap-web-client icon indicating copy to clipboard operation
lizmap-web-client copied to clipboard

[Bug]: Random layers dissapear from map. 3.5.2

Open johnzet39 opened this issue 2 years ago β€’ 13 comments

What is the bug?

Sometimes, for unknown reasons, random layers from the map begin to disappear. Restarting the qgis-server, php-frm, ngnix does not help. Last time restarting the server helped. lizmap_hidden

Steps to reproduce the issue

  1. no steps

Versions

Versions :

  • Lizmap Web Client : 3.5.2
  • Lizmap plugin : 3.7.7
  • QGIS Desktop : 3.22.5
  • QGIS Server : 3.22.5
  • QGIS Server plugin atlasprint : not found
  • QGIS Server plugin cadastre : not found
  • QGIS Server plugin lizmap : 3.7.6
  • QGIS Server plugin wfsOutputExtension : 1.7.0

QGIS server version, only if the section above doesn't mention the QGIS Server version

No response

Operating system

ubuntu

Browsers

Chrome

Browsers version

Any

Relevant log output

No response

johnzet39 avatar Jun 24 '22 15:06 johnzet39

Without more details or data, project, we won't be able to debug. We didn't have this bug so far. Some logs from QGIS server with GetMap requests ? Some logs from the webbrowser ? etc Does the same thing happen in QGIS desktop (using WMS) ? Can you try request QGIS server straight ?

Gustry avatar Jun 24 '22 15:06 Gustry

Also try to fill the template as requested about versions and check if there are any messages displayed when doing it, thanks.

Gustry avatar Jun 24 '22 15:06 Gustry

As far as I remember, last time there was nothing interesting in the logs of the QGIS server. I'll try to test later. Everything is fine in the webbrowser console. I checked exactly that in the desktop version through the WMS service the same result - some layers dissapear randomly.

johnzet39 avatar Jun 24 '22 15:06 johnzet39

Without more details or data, project, we won't be able to debug. We didn't have this bug so far. Some logs from QGIS server with GetMap requests ? Some logs from the webbrowser ? etc Does the same thing happen in QGIS desktop (using WMS) ? Can you try request QGIS server straight ?

I have several projects and it worked fine for more than two weeks. At the moment, in any project, the same situation occurs.

johnzet39 avatar Jun 24 '22 15:06 johnzet39

This issue is missing some feedbacks. πŸ‘» Please have a look to the discussion, thanks. 🦎

3liz-bot avatar Jul 26 '22 05:07 3liz-bot

Temporarily the problem is solved by rebooting the server. Restarting the qgis-server service does not help.

Since then, this situation has arisen several times. The trend is when I modify (using the lizmap plugin) an existing project. Previously, I could make a number of changes to the project to cause this problem to occur. Now that I have about 70 layers in my project, this issue occurs after the first change to the project after a server restart.

johnzet39 avatar Aug 03 '22 10:08 johnzet39

Thanks for the feedback. Side question, which QGIS server are you using ? FCGI, Py-QGIS-Server ? Did you enable some cache on the server side ?

Sorry, I can't really help you

Gustry avatar Aug 03 '22 10:08 Gustry

Perhaps this is just a coincidence: I have 16 processor cores. If 2 layers are enabled, then 8 map extent changes must be made between layer disappearances. If 3 layers - 5. etc

johnzet39 avatar Aug 03 '22 10:08 johnzet39

Thanks for the feedback. Side question, which QGIS server are you using ? FCGI, Py-QGIS-Server ? Did you enable some cache on the server side ?

Sorry, I can't really help you

QGIS server 3.22.5, FCGI. Cache you mean server tile cache? The problem occurs even in projects where there are no such layers

johnzet39 avatar Aug 03 '22 10:08 johnzet39

This issue is missing some feedbacks. πŸ‘» Please have a look to the discussion, thanks. 🦎

3liz-bot avatar Sep 06 '22 05:09 3liz-bot

As feedback, I report that I I am forced to restart the server after each change to the qgs(cfg) project.

johnzet39 avatar Sep 06 '22 07:09 johnzet39

As feedback, I report that I I am forced to restart the server after each change to the qgs(cfg) project.

You should look at Py-QGIS-Server instead of FCGI with SERVER_RESTARTMON https://docs.3liz.org/py-qgis-server/configuration.html#server-restartmon

Gustry avatar Sep 06 '22 08:09 Gustry

This issue is missing some feedbacks. πŸ‘» Please have a look to the discussion, thanks. 🦎

3liz-bot avatar Oct 07 '22 04:10 3liz-bot

This issue is missing some feedbacks. πŸ‘» Please have a look to the discussion, thanks. 🦎

3liz-bot avatar Nov 22 '22 04:11 3liz-bot

This issue is missing some feedbacks. πŸ‘» Please have a look to the discussion, thanks. 🦎

3liz-bot avatar Dec 27 '22 04:12 3liz-bot

This issue is missing some feedbacks. πŸ‘» Please have a look to the discussion, thanks. 🦎

3liz-bot avatar Jan 31 '23 04:01 3liz-bot

I hope you could find the bottleneck. If your layers are stored in PostgreSQL, maybe have a look to #3409 about the pool of connections to Postgresql I'm closing for lack of feedback.

Gustry avatar Jan 31 '23 08:01 Gustry

Hello! I really hope this helps us! :) You are having the same problem. lizmap_layers__11

johnzet39 avatar Mar 10 '23 08:03 johnzet39

@Gustry Can we reopen this issue?

johnzet39 avatar Mar 10 '23 08:03 johnzet39

We got the issue last week. I was on the cat project and also on the rendering expression map on Italy, and also time manager (shapefile or gpkg). The quickest solution was to restart QGIS. But it doesn't solve the issue itself.

It's not an issue with Lizmap, but with QGIS server rendering empty tiles.

Gustry avatar Mar 10 '23 09:03 Gustry

Yes, I suspect it's not Lizmap. If you add as MWS into the QGIS Desktop, then the behavior of the layers is similar. But since you have the same problem, I hope you will be interested in solving this problem.

johnzet39 avatar Mar 10 '23 09:03 johnzet39

But since you have the same problem, I hope you will be interested in solving this problem.

As mentioned, we noticed this issue last week ;-)

Gustry avatar Mar 10 '23 10:03 Gustry

This issue is missing some feedbacks. πŸ‘» Please have a look to the discussion, thanks. 🦎

3liz-bot avatar Apr 14 '23 04:04 3liz-bot

We made some balancing on the connections on our PostgreSQL servers. And I don't think we have any bug report now for a few days/weeks from our users.

This error is QGIS server having issues to connect to the database, so sometimes rendering empty tiles.

We didn't change anything on the LWC source code.

Internal reference infra-doc issue 1109

Gustry avatar Apr 14 '23 11:04 Gustry

Some information, observations from me:

  • I don't use layers in PostgreSQL. Mostly shapefiles and some geopackage.
  • If we talk about connecting to PostgreSQL, I don’t think this is a problem, since the disappearance of layers has a progressive tendency - that is, for some time after rebooting the system everything works fine, but after some time (in my case 8+ hours, depending on the number of requests? or new connections?) problems start.
  • At the moment I have to reboot the system every 8 hours. If I change and save a large project, then I reboot the system immediately, because the layers are no longer displayed at that moment.
  • I have a complete clone of my working virtual machine. The clone does not have Internet access, 1-2 people work with it. The clone has 1 month of uptime now. I have saved projects many times. On the clone, the disappearance of layers has not been observed so far.
  • Restarting the qgis-server helps for a few minutes.

johnzet39 avatar Apr 14 '23 12:04 johnzet39

@johnzet39 if you are working with files, we have already encountered an issue with the maximum number of opened files by QGIS Server. Each QGIS Server opens files and keeps them opened until the project is removed from memory. It is also possible that some files were never freed event if the project has been removed from memory.

rldhont avatar Apr 14 '23 12:04 rldhont

@rldhont What is the limit on the number of open files? Is there a way to clear memory from open files?

This does not explain why the disappearance does not start immediately after opening the project, but after a few hours.

johnzet39 avatar Apr 14 '23 12:04 johnzet39

Indeed, it's possible to reach the maximum of opened files allowed by the filesystem. I don't know the command to check the current opened files. Quick look : https://www.baeldung.com/linux/limit-file-descriptors

This does not explain why the disappearance does not start immediately after opening the project, but after a few hours.

It really depends of your installation and your usage. At the beginning, you might have enough "slot", but with the time, different QGIS server running in parallel etc, some slot are not freed as my colleague said above. Unfortunately, I know nothing about this area, so I won't dig further :/

Gustry avatar Apr 14 '23 13:04 Gustry

This issue is missing some feedbacks. πŸ‘» Please have a look to the discussion, thanks. 🦎

3liz-bot avatar May 16 '23 04:05 3liz-bot