Select query returning: no such table error
(1) By anonymous on 2021-09-14 15:47:05 [source]
We are running sqlite on RHEL7.9 The process that is accessing the database is able to fetch the records for hours continuously when in the middle the sqlite error occurs with the error code: 1 stating no such table'. Evidently, the same query worked milliseconds before. Any idea on what could be the issue?
(2) By Larry Brasfield (larrybr) on 2021-09-14 15:56:09 in reply to 1 [link] [source]
Either the hardware substrate is wonky, something else is also accessing the database, or some other software running in the same process is corrupting the data used by SQLite.
More details would help narrow these broad categories.
(3) By Simon Slavin (slavin) on 2021-09-15 11:42:17 in reply to 1 [link] [source]
We've seen this sort of thing before. It often turns out that something is stomping on the memory SQLite uses to keep track of data or file handles, causing it to look in a corrupted list of tables, or in a non-existent file. I'm not saying that this is the cause in your case, just that it's something to look for.
Do you have anything else accessing the same file ? It could be the SQLite API being called from another thread, process or app. But it could also be an automatic backup routine which locks the file while it backs it up. And in a non-Linux context I would also be suspicious of a virus-checker.