semidbm icon indicating copy to clipboard operation
semidbm copied to clipboard

just a question about an issue i'm seeing with db disappearing

Open ghost opened this issue 9 years ago • 2 comments

I have a dbm I use that I access via read-only sdbm handle in a web server, I never write to this handle (which wouldn't be possible anyway), but every once in awhile my data disappears, i.e. all the contents disappear (size goes from 2.6G to 8kb). It's hard to debug this because I don't write to the handle anywhere and it happens once every few weeks so it's hard for me to reproduce. I do access the read_only handle from multiple threads, so I'm wondering if somehow that's causing a problem? Here is how I create the handle

sdbm_read_only = sdbm.open(os.path.expandvars(self.config.get("sdbm_location")),'r')

ghost avatar Oct 12 '15 15:10 ghost

and the threaded logic that accesses it

pool = gevent.pool.Pool(100) threads = [pool.spawn(self.read_from_sdbm,key) for key in things] pool.join()

ghost avatar Oct 12 '15 15:10 ghost

That's very concerning.

Is there any process on that box that ever writes to the db? How is the semidbm data file being initially populated?

jamesls avatar Oct 13 '15 18:10 jamesls