Hello, I had the same problem. Just try again and again until it works, each time it does a bit more of the migration before being locked.
Eventually, you can try increasing this parameters in the grafana.ini : # For "sqlite" only. How many times to retry query in case of database # is locked failures. Default is 0 (disabled). ;query_retries = 0 # For "sqlite" only. How many times to retry transaction in case of # database is locked failures. Default is 5. ;transaction_retries = 5 Breizh. Le Tue, 10 Mar 2026 12:06:14 +0100, Łukasz Michalski <[email protected]> a écrit : > Hi, > > I've got following error when upgrading grafana from 12.3.0 to 12.4.0: > > error="rebuilding indexes failed for org 1 (default): rebuild index > error: resource_last_import_time_query.sql: Query with 0 input > arguments and 0 output destination arguments: database is locked (5) > (SQLITE_BUSY); query: SELECT \"namespace\", \"group\", \"resource\", > \"last_import_time\"\n FROM \"resource_last_import_time\";" > > I filled a bug here: > https://github.com/grafana/grafana/issues/119912 > > Anyone has a solution for this? > > Thanks, > Łukasz > > >
