Skip to content
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

File size bloat when anydbm picks gdbm #90

Closed
sqlalchemy-bot opened this issue Jan 12, 2016 · 4 comments
Closed

File size bloat when anydbm picks gdbm #90

sqlalchemy-bot opened this issue Jan 12, 2016 · 4 comments
Labels
bug Something isn't working low priority

Comments

@sqlalchemy-bot
Copy link

Migrated issue, originally created by David Gardner ()

This might not be a dogpile cache bug, but ran into this and thought you should be aware of it.

When using the dogpile.cache.dbm disk backend if the anydbm picks the gdbm implementation, then the dbm disk file will continue to grow. The reason seems to be that gdbm requires that gdbm.reorganize is called periodically while none of the other dbm backends have this method.


Attachments: gdbm-repro.py

@sqlalchemy-bot
Copy link
Author

Michael Bayer (zzzeek) wrote:

there's not much that can be done on this end about that and it seems this is only in terms of deletions. so it depends on what kind of caching you're doing.

@sqlalchemy-bot
Copy link
Author

David Gardner () wrote:

With regard to deletes, I think this includes overwriting an existing key.

I'm attaching a simple repro script of the issue (which last weekend eventually filled up the disk on my dev server).

When I run the script without any arguments, dogpile/anydbm will use the dbhash module, and the size of the dbm will grow and shrink as the contents of the cache change as expected.

When run with 'g' as the first argument the file will quickly grow to be several megabytes.

The background on this is trying to use an older Python 2.6 build where Python's _bsddb.so was linked against libdb-4.3.so inside of mod_wsgi+Apache both of which were linked against libdb-4.7.so, and using dbhash was causing a segfault.

With that said I agree this really isn't a dogpile issue, but wanted to document this in case anyone else ran into it.

@sqlalchemy-bot
Copy link
Author

Changes by David Gardner ():

  • attached file gdbm-repro.py

@sqlalchemy-bot sqlalchemy-bot added bug Something isn't working low priority labels Nov 24, 2018
@zzzeek
Copy link
Member

zzzeek commented Nov 3, 2020

hopefully gdbm is not in common usage now, closing

@zzzeek zzzeek closed this as completed Nov 3, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working low priority
Projects
None yet
Development

No branches or pull requests

2 participants