Select query returning: no such table error
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?
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.
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.