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

[Bug]: Random layers dissapear from map. 3.5.2 #3086

Closed
johnzet39 opened this issue Jun 24, 2022 · 29 comments
Closed

[Bug]: Random layers dissapear from map. 3.5.2 #3086

johnzet39 opened this issue Jun 24, 2022 · 29 comments
Labels
bug feedback QGIS Server stale This ticket might be closed soon

Comments

@johnzet39
Copy link

johnzet39 commented Jun 24, 2022

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 johnzet39 added the bug label Jun 24, 2022
@Gustry
Copy link
Member

Gustry commented Jun 24, 2022

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
Copy link
Member

Gustry commented Jun 24, 2022

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

@johnzet39
Copy link
Author

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
Copy link
Author

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.

@3liz-bot
Copy link
Contributor

This issue is missing some feedbacks. 👻
Please have a look to the discussion, thanks. 🦎

@3liz-bot 3liz-bot added stale This ticket might be closed soon and removed stale This ticket might be closed soon labels Jul 26, 2022
@johnzet39
Copy link
Author

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.

@Gustry
Copy link
Member

Gustry commented Aug 3, 2022

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

@johnzet39
Copy link
Author

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
Copy link
Author

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

@3liz-bot
Copy link
Contributor

3liz-bot commented Sep 6, 2022

This issue is missing some feedbacks. 👻
Please have a look to the discussion, thanks. 🦎

@3liz-bot 3liz-bot added the stale This ticket might be closed soon label Sep 6, 2022
@johnzet39
Copy link
Author

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

@3liz-bot 3liz-bot removed the stale This ticket might be closed soon label Sep 6, 2022
@Gustry
Copy link
Member

Gustry commented Sep 6, 2022

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

@3liz-bot
Copy link
Contributor

3liz-bot commented Oct 7, 2022

This issue is missing some feedbacks. 👻
Please have a look to the discussion, thanks. 🦎

@3liz-bot 3liz-bot added stale This ticket might be closed soon and removed stale This ticket might be closed soon labels Oct 7, 2022
@Gustry Gustry added the stale This ticket might be closed soon label Oct 17, 2022
@3liz-bot 3liz-bot removed the stale This ticket might be closed soon label Oct 19, 2022
@3liz-bot
Copy link
Contributor

This issue is missing some feedbacks. 👻
Please have a look to the discussion, thanks. 🦎

@3liz-bot 3liz-bot added stale This ticket might be closed soon and removed stale This ticket might be closed soon labels Nov 22, 2022
@3liz-bot
Copy link
Contributor

This issue is missing some feedbacks. 👻
Please have a look to the discussion, thanks. 🦎

@3liz-bot 3liz-bot added stale This ticket might be closed soon and removed stale This ticket might be closed soon labels Dec 27, 2022
@3liz-bot
Copy link
Contributor

This issue is missing some feedbacks. 👻
Please have a look to the discussion, thanks. 🦎

@3liz-bot 3liz-bot added the stale This ticket might be closed soon label Jan 31, 2023
@Gustry
Copy link
Member

Gustry commented Jan 31, 2023

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 Gustry closed this as completed Jan 31, 2023
@3liz-bot 3liz-bot removed the stale This ticket might be closed soon label Jan 31, 2023
@johnzet39
Copy link
Author

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

@johnzet39
Copy link
Author

@Gustry Can we reopen this issue?

@rldhont rldhont reopened this Mar 10, 2023
@Gustry
Copy link
Member

Gustry commented Mar 10, 2023

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.

@johnzet39
Copy link
Author

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.

@Gustry
Copy link
Member

Gustry commented Mar 10, 2023

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 ;-)

@3liz-bot
Copy link
Contributor

This issue is missing some feedbacks. 👻
Please have a look to the discussion, thanks. 🦎

@3liz-bot 3liz-bot added the stale This ticket might be closed soon label Apr 14, 2023
@Gustry
Copy link
Member

Gustry commented Apr 14, 2023

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

@3liz-bot 3liz-bot removed the stale This ticket might be closed soon label Apr 14, 2023
@johnzet39
Copy link
Author

johnzet39 commented Apr 14, 2023

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.

@rldhont
Copy link
Collaborator

rldhont commented Apr 14, 2023

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

@johnzet39
Copy link
Author

johnzet39 commented Apr 14, 2023

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

@Gustry
Copy link
Member

Gustry commented Apr 14, 2023

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 :/

@3liz-bot
Copy link
Contributor

This issue is missing some feedbacks. 👻
Please have a look to the discussion, thanks. 🦎

@3liz-bot 3liz-bot added the stale This ticket might be closed soon label May 16, 2023
@3liz-bot 3liz-bot closed this as not planned Won't fix, can't repro, duplicate, stale May 26, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug feedback QGIS Server stale This ticket might be closed soon
Projects
None yet
Development

No branches or pull requests

5 participants