sqlite3.OperationalError: database is locked
See original GitHub issueHello,
Running telethon client with multi workers under pool executor causes constant database locks:
ERROR:telethon.telegram_bare_client:Connection was reset while receiving items. Reconnecting ERROR:telethon.telegram_bare_client:Connection was reset while receiving items. Reconnecting ERROR:telethon.telegram_bare_client:Unknown exception in the read thread! Disconnecting and leaving it to main t Traceback (most recent call last): File "/usr/local/lib/python3.4/dist-packages/telethon/telegram_bare_client.py", line 690, in _recv_thread_impl self.idle(stop_signals=tuple()) File "/usr/local/lib/python3.4/dist-packages/telethon/telegram_bare_client.py", line 659, in idle self._sender.receive(update_state=self.updates) File "/usr/local/lib/python3.4/dist-packages/telethon/network/mtproto_sender.py", line 147, in receive self._process_msg(remote_msg_id, remote_seq, reader, update_state) File "/usr/local/lib/python3.4/dist-packages/telethon/network/mtproto_sender.py", line 197, in _process_msg return self._handle_rpc_result(msg_id, sequence, reader) File "/usr/local/lib/python3.4/dist-packages/telethon/network/mtproto_sender.py", line 496, in _handle_rpc_res self.session.process_entities(request.result) File "/usr/local/lib/python3.4/dist-packages/telethon/session.py", line 405, in process_entities 'insert or replace into entities values (?,?,?,?,?)', rows sqlite3.OperationalError: database is locked
Is there a way we can fix this?
Thank you, Andrei.
Issue Analytics
- State:
- Created 6 years ago
- Comments:12 (6 by maintainers)
Well you should know if you have a connected client on a certain file.
That’s not a problem related to the library, and you should ask somewhere else.