-
Notifications
You must be signed in to change notification settings - Fork 5
Open
Labels
Description
Context:
When performing a discretization (styling) on a layer containing several million entities, the SQL query executed by TerraVisu in the database fails to complete before the current timeout (30 seconds).
As a result, the process is interrupted before completion, causing an error and preventing the style from being updated.
Steps to reproduce
- Load a layer with several million entities in TerraVisu.
- Run a discretization through the back-office (e.g. a Jenks classification).
- Observe that the query exceeds the 30-second timeout and fails.
Expected behavior
The discretization query should be able to complete successfully without errors, even for very large layers.
Possible solutions
Two possible improvements:
-
Increase the query timeout
- Add a configuration variable in TerraVisu
- Default value: 30 seconds
- Allow it to be increased (e.g. 120 seconds) depending on the server’s capacity
-
Run the discretization as an asynchronous task (via Celery)
- Would prevent the web server from being blocked during processing
- Requires more development effort but would be more robust in the long term