SQLite Forum

no such table error

no such table error

(1) By Divya K Konoor (dikonoor) on 2020-08-12 10:24:48 [link] [source]


I am using RHEL7 with Apache httpd, MariaDB and SQLLite with following versions:

rpm -qa | grep httpd

httpd-2.4.6-93.el7.x86_64 httpd-tools-2.4.6-93.el7.x86_64

rpm -qa | grep mariadb

mariadb-5.5.65-1.el7.x86_64 mariadb-server-5.5.65-1.el7.x86_64 mariadb-libs-5.5.65-1.el7.x86_64

rpm -qa | grep sqlite


These are used as part of my open source cloud platform namely OpenStack (stein). One of my openstack processes namely keystone runs inside httpd. the Keystone processes in turn use python sqlalchemy library to connect to the database.

It is found in 5% of the cases where httpd service is restarted, the new process throws "no such table error". But if the service is restarted, the problem disappears. Is it possible that the root cause here is that when httpd service is restarted, the keystone process inside it is still holding on to the DB connection and before it is released the new process attempts to get the connection, and the new process does not successfully get it due to which it auto creates a DB, which finally leads to this error ?

Some context to this problem can be found at https://bugs.launchpad.net/keystone/+bug/1891019

(2) By Larry Brasfield (LarryBrasfield) on 2020-08-12 14:32:42 in reply to 1 [link] [source]

Is it possible that ... the new process ... auto creates a DB, which finally leads to this error ?

Given what I know, yes, that is possible. I know that I could write code which would be consistent with the scanty facts you have stated, and which would produce the error you have barely documented. Whether your code is failing in the way mine would is an open question, not susceptible to anything but conjecture without more details that would shed light on this question: Has a new database been created when the "no such table" error arises?

Once you can answer that question, then an investigation into when database creation should and should not occur may be useful. I suggest considering the question first as a requirement or design objective, then as a matter of what your program actually does. And, what it does is best determined by relevant data, such as the code itself, a carefully formed abstraction of the code, or diagnostic output from the running code.

I further suggest that you spend more time on a single help request rather than too little time on help requests submitted in multiple places. There is a good chance that such effort will enable you to solve your problem even before giving others a real opportunity to see what has gone wrong. Such opportunity is missing in your bare summary posted here and there and who knows where else.

(3) By Divya K Konoor (dikonoor) on 2020-08-18 12:35:23 in reply to 2 [source]

Hi Larry,

Thanks for your response. I was unable to add enough details in the original post as 1) it was very difficult to reproduce it and I wanted to gather some more data before I could add more details. 2) I was trying to understand if this was a known problem that people ran into often.

I have added more details into https://bugs.launchpad.net/keystone/+bug/1891019 based on the current observations. At this point, this doesn't looks like a sqlite bug to me.