seikur0 / PGO-mapscan-opt

GNU General Public License v3.0
111 stars 50 forks source link

Database is locked #256

Closed c00ni closed 8 years ago

c00ni commented 8 years ago

I'm running unmodified https://github.com/seikur0/PGO-mapscan-opt/commit/e88bf1931775b69564be9b25c05aa61b3cb59da3 which is pretty much current. Learning new areas seems fine with 80 workers. Finished learning and now I'm using 30 workers for iscan. Got this during catchup 2/2:

Exception in thread Thread-1:
Traceback (most recent call last):
  File "c:\python27\lib\threading.py", line 801, in __bootstrap_inner
    self.run()
  File "main0.py", line 1757, in run
    update_data()
  File "main0.py", line 863, in update_data
    db_data.commit()
OperationalError: database is locked
seikur0 commented 8 years ago

With the telegram bot I take it?

c00ni commented 8 years ago

Nope. Telegram and pushbullet both disabled (and whatever other additional things you've implemented)

seikur0 commented 8 years ago

Multiple ids?

c00ni commented 8 years ago

Only id 0.

Just guessing here, is it possible the database was being read by pokesite at the same time it was being written to?

seikur0 commented 8 years ago

Do you have the newest version of pokesite.py as well? It shouldn't matter, it's in WAL mode, which allows for one write and an infinite number of reads at the same time.

c00ni commented 8 years ago

It was a fresh complete zip, even manually re-added stuff to usersettings to keep it clean.

seikur0 commented 8 years ago

I hate this, why is it doing that. I'll just add try loops everywhere, I don't care anymore <.<

c00ni commented 8 years ago

When I moved from a different scanner to yours I was kinda relieved you weren't using a database because I kept getting these problems. With difficulty I migrated it to something other than SQLite but it just seemed so clunky. I feel your pain. The struggle is real.

seikur0 commented 8 years ago

Okay, fixed.....