-
Notifications
You must be signed in to change notification settings - Fork 142
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Critical DB issue #33
Comments
The query is "create table..." A -----Original Message----- Well, I am getting this error with large files that do not happen with smaller ones. Finding ORFs in contigsGenes ........................................: /tmp/tmpqjiEz2/contigs.genes HMM Profiling for Dupont_et_alReference ....................................: Dupont et al, http://www.nature.com/ismej/journal/v6/n6/full/ismej2011189a.html HMM Profiling for Campbell_et_alReference ....................................: Campbell et al, http://www.pnas.org/content/110/14/5540.short HMM Profiling for Wu_et_alReference ....................................: Wu et al, http://genomebiology.com/2008/9/10/R151 |
Oops, sorry. So, I was going to say, the query is "create table" and the error "table ... Exists". You can add "create table if not exists...". -----Original Message----- Well, I am getting this error with large files that do not happen with smaller ones. Finding ORFs in contigsGenes ........................................: /tmp/tmpqjiEz2/contigs.genes HMM Profiling for Dupont_et_alReference ....................................: Dupont et al, http://www.nature.com/ismej/journal/v6/n6/full/ismej2011189a.html HMM Profiling for Campbell_et_alReference ....................................: Campbell et al, http://www.pnas.org/content/110/14/5540.short HMM Profiling for Wu_et_alReference ....................................: Wu et al, http://genomebiology.com/2008/9/10/R151 |
Hi Anna, Thank you for the comment. But the issue is a bit knottier than that. The table is there, and the code should never branch into that line. Here where the check is being done: https://github.com/meren/PaPi/blob/master/PaPi/annotation.py#L260 You can see in the line before, it gets the table names from the database, which is a simple operation: https://github.com/meren/PaPi/blob/master/PaPi/db.py#L153 This error does not happen with runs that don't take too long. I think database connection times out, and it doesn't return table names properly or something. Because the table is there, it is just the code sometimes, especially during long runs can't recover that information from the database :/ |
Anna, Would you say keeping every db operation atomic is a better practice instead of keeping the connection open for very long periods of time? I am planning to change the database wrapper class to a much more atomic one, so every function will (1) open a connection, (2) query the db and collect results, (3) close connection. I am not sure how much overhead this will bring, but I feel like it can resolve this issue I am dealing with (if this approach is better, I will rely on aspect oriented programming to decorate db functions in https://github.com/meren/PaPi/blob/master/PaPi/db.py). Best, |
Meren, Yes, you check if the table exists with python, maybe to do that within the File "/groups/merenlab/PaPi/PaPi/db.py", line 68, in create_table "OperationalError: table search_info already exists" will be gone if query self._exec('''CREATE TABLE IF NOT EXISTS %s (%s)''' % (table_name, I'm sure you are right and the real problem is different, but maybe you The second thing is a connection timeout. There are several options you can play with.
"
Not sure if it help, I'd like to know more about the db configuration. Anya On Sun, Feb 8, 2015 at 2:13 PM, A. Murat Eren notifications@github.com
|
If you knew about the db configuration you would have decided to come to the lab with a bucket of gasoline and set my computer on fire. I am changing the classes a bit so the database connection is not made until the data is ready for submission. I will see if this changes anything, but it definitely makes more sense as you pointed out. Best, |
:-) On Sun, Feb 8, 2015 at 3:50 PM, A. Murat Eren notifications@github.com
|
…cture of annotation library. this now passes my small tests, and will see how it porforms on very large datasets. Related #33
I just finished testing on the servers, commit 34d7342 worked like magic, so this is resolved! :) |
Well, I am getting this error with large files that do not happen with smaller ones.
This may be a db.commit() issue. Needs to be checked properly:
The text was updated successfully, but these errors were encountered: