Skip to content

temporal: make SQLite TGIS DB connections more robust - #7653

Merged
ninsbl merged 7 commits into
OSGeo:mainfrom
ninsbl:robust_tgis_connections
Jul 9, 2026
Merged

ninsbl merged 7 commits into
OSGeo:mainfrom
ninsbl:robust_tgis_connections

Conversation

@ninsbl

@ninsbl ninsbl commented Jul 9, 2026

Copy link
Copy Markdown
Member

I have been experiencing issues with SQLite connections like "Locked database" when registering maps in relatively large STDS. This PR is an attempt to make connections a bit more robust by:

  1. adding a busy_timeout: operations do not fail immediately if a lock exists but wait at least 30 seconds.
  2. putting all PRAGMA definitions for the connection in one script and execute it with connection.executescript(). When connection PRAGMA was set for SQLite with connection.execute(), a result row was lingering. executescript does not leave that result row lingering.
  3. execute_transaction was supposed to wrap an SQL statement with BEGIN and END. However, the initial, and not the wraped SQL statement was finally executed. This is fixed here as well.

@ninsbl ninsbl added this to the 8.6.0 milestone Jul 9, 2026
@ninsbl
ninsbl requested a review from echoix July 9, 2026 14:37
@github-actions github-actions Bot added Python Related code is in Python libraries labels Jul 9, 2026
@ninsbl
ninsbl merged commit b130fba into OSGeo:main Jul 9, 2026
26 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

libraries Python Related code is in Python

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants