Skip to content

Commit f87aae1

Browse files
committed
Add FAQ about "database is locked" error
1 parent 82e0087 commit f87aae1

1 file changed

Lines changed: 17 additions & 0 deletions

File tree

docs/source/faq.rst

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -269,6 +269,23 @@ Telegram cloud. This error usually happens in case the provided URL is not publi
269269
media exceeds 20 MB in size. In such cases, your only option is to download the media yourself and upload from your
270270
local machine.
271271

272+
sqlite3.OperationalError: database is locked
273+
--------------------------------------------
274+
275+
This error occurs when more than one process is using the same session file, that is, when you run two or more clients
276+
at the same time using the same session name.
277+
278+
It could also occur when a background script is still running and you forgot about it. In this case, you either restart
279+
your system or find and kill the process that is locking the database. On Unix based systems, you can do the following:
280+
281+
#. ``cd`` into your session file directory.
282+
#. ``fuser my_account.session`` to find the process id.
283+
#. ``kill 1234`` to gracefully stop the process.
284+
#. If the last command doesn't help, use ``kill -9 1234`` instead.
285+
286+
If you want to run multiple clients on the same account, you must authorize your account (either user or bot)
287+
from the beginning every time, and use different session names for each parallel client you are going to use.
288+
272289
My verification code expires immediately!
273290
-----------------------------------------
274291

0 commit comments

Comments
 (0)