zodb

How to define DB-location in a Plone-4.1-Unified-Zeo-Install?

北慕城南 提交于 2020-01-05 08:35:08
问题 In Plone's 4.3.1-Unified-Installer's base.cfg (ZEO) I can see, it is possible to define the ZODB-location as a variable, in Plone-4.1.6-Unfied-Installer's base.cfg, not. Before I start investigating further: Is is it possible to mimicry this in 4.1 by simply adjusting the config, or does this option depend on higher core-package-versions? 回答1: Yes, you should be able to do it by adjusting the 4.1.x config. The 4.3.x feature was just an enhancement of the installer; the ability to do it has

“Unhandled exception in thread started by Error in sys.excepthook” during relstorage zodb pack

和自甴很熟 提交于 2020-01-02 18:38:48
问题 We have a reasonably large Plone instance running on its own mount point. The ZMI interface lists the size of the database as 7101.4M. We run a weekly pack of the database using the Relstorage zodbpack.py script, removing objects older than 7 days. The last two weeks the cron job that runs the pack has output the following: Sun Jun 26 07:00:38 BST 2011 packing cms mount /home/zope/home/parts/zope2/lib/python/zope/configuration/xmlconfig.py:323: DeprecationWarning: zope.app.annotation has

ZODB ignores target cached object count and target cache memory size

梦想的初衷 提交于 2019-12-24 17:28:44
问题 I want to use ZODB with as little caching as possible. For this, I'm creating ZODB database instance and opening it like this: db = DB('/home/me/example.db', cache_size=1, cache_size_bytes=1) db_conn = db.open_then_close_db_when_connection_closes() db_conn is the only connection of db . I'm verifying that both its target cache size parameters are set by checking db_conn._cache.cache_size and db_conn._cache.cache_size_bytes , which evaluate to 1 each. In the database, I store lots (could be

zc.lockfile.LockError in ZODB

北战南征 提交于 2019-12-19 20:25:06
问题 I am trying to use ZODB 3.10.2 on my web server which is running Debian and Python 2.7.1. It seems like every time I try to access the same database from 2 different processes, I get a mysterious exception. I tried accessing a database from an interactive Python session and everything seemed to work fine: >>> import ZODB >>> from ZODB.FileStorage import FileStorage >>> storage = FileStorage("test.db") >>> But then I tried the same series of commands from another session running at the same

ZODB: To where transaction.savepoint writes data?

房东的猫 提交于 2019-12-11 05:29:36
问题 According to ZODB documentation: A savepoint allows a data manager to save work to its storage without committing the full transaction." "Savepoints are also useful to free memory that would otherwise be used to keep the whole state of the transaction. According to the very instructive article When to commit data in ZODB (Martijn Pieters): ... a point during the whole transaction where you can ask for data to be temporarily stored on disk. [...] One thing a savepoint does, is call for a

Less Conflicting Session Manager for Zope 2

拈花ヽ惹草 提交于 2019-12-11 02:38:44
问题 Zope2 Sessioning documentation: "Conflict errors will be retried automatically by Zope, and the end user should never see one." However, although I think I have the best setup for a high traffic deployment (temporary storage for session data on ZEO, shared by four clients, zope instances with identical setup), end user still gets Database ConflictErrors. Searching the mail lists, it seems this is a common issue for Zope's implementation of session data based on OOBTree. Some suggest using

Cleanup unused blobs in filestorage in Plone

≡放荡痞女 提交于 2019-12-11 01:20:44
问题 Is there a way to find and remove unused blob storage space in a Plone site? I'm looking for something like bin/zeopack , but that detects unused blobs in the blobstorage directory. 回答1: The ZODB takes care of unused blobs by itself. Packing will remove blobs together with removed transactions as required. 来源: https://stackoverflow.com/questions/13938983/cleanup-unused-blobs-in-filestorage-in-plone

When PersistentDict, when Folder?

拥有回忆 提交于 2019-12-10 17:43:53
问题 When should I use a PersistentDict, and when should I use a Folder? What is the difference between them in terms of updates, internal structure, performance, etc? 回答1: A PersistentMapping is simply a implementation of the python dict type (via the standard library UserDict base class) adjusted for the Persistence semantics of the ZODB; it saves from having to set the _p_changed flag on the nearest class that inherits from Persistent every time you alter the mapping . A Folder is a much richer

Renaming my.packages to my.package

喜欢而已 提交于 2019-12-10 14:21:30
问题 my.packages is a custom archetypes package in the src directory. Thousands of items in the Plone instance are added with its types. I want to rename the package as my.package. By simply uninstalling my.packages and installing my.package, I find http://localhost:8080/mysite/myfolder/my-item showing <persistent broken my.packages.content.mytype.MyType instance '\x00\x00\x00\x00\x00Un^'> . Should I have to do migration? Or is there a simple way to fix this issue? 回答1: You can create an alias for

How to improve performance of a script operating on large amount of data?

情到浓时终转凉″ 提交于 2019-12-10 11:39:00
问题 My machine learning script produces a lot of data (millions of BTree s contained in one root BTree ) and store it in ZODB's FileStorage , mainly because all of it wouldn't fit in RAM. Script also frequently modifies previously added data. When I increased the complexity of the problem, and thus more data needs to be stored, I noticed performance issues - script is now computing data on average from two to even ten times slower (the only thing that changed is amount of data to be stored and