# What to do about SQLITE\_BUSY errors despite setting a timeout

DevFeed: [What to do about SQLITE\_BUSY errors despite setting a timeout](<https://devfeed.tech/articles/what-to-do-about-sqlite-busy-errors-despite-setting-a-timeout-36239.md>)

Original publisher: [Read original article](<https://berthub.eu/articles/posts/a-brief-post-on-sqlite3-database-locked-despite-timeout/>)

Published: 2025-02-16T20:00:00Z

Content type: tutorial

Language: en

Sources: [Bert Hubert's writings](<https://devfeed.tech/sources/bert-hubert-s-writings.md>)

Topics: [SQLite](<https://devfeed.tech/topics/sqlite.md>), [Concurrency](<https://devfeed.tech/topics/concurrency.md>), [PostgreSQL](<https://devfeed.tech/topics/postgresql.md>)

Tags: [errors](<https://devfeed.tech/tags/errors.md>), [postgresql](<https://devfeed.tech/tags/postgresql.md>), [programming](<https://devfeed.tech/tags/programming.md>), [rsync](<https://devfeed.tech/tags/rsync.md>), [sqlite](<https://devfeed.tech/tags/sqlite.md>), [timeout](<https://devfeed.tech/tags/timeout.md>)

## AI overview

This article explains why SQLite can return SQLITE_BUSY despite a configured timeout. It recommends avoiding read-to-write transaction upgrades and using BEGIN IMMEDIATE, or starting the transaction with a write, while describing the concurrency behavior involved.

## Source excerpt

So I'm a huge SQLite fanboy and I use it for almost everything these days. Recently, the project added sqlite3_rsync which allows you to swiftly replicate your database to other servers (or to the same server if you want), and this really was the cherry on top for me. Last week however, I ran into one of my projects unexpectedly getting SQLITE_BUSY errors. And then someone urged me to run 'a real database' (PostgreSQL), and that hurt.