"Jay, Dylan" wrote:
I have a method that takes a long time on a system that uses a level 2 DA, therefore it blocks the entire site
To be more specific, it blocks all other requests through that and other level 2 DAs. Non SQL related calls and level 3 DA calls will not get blocked.
(it also uses UserDB so everything uses the DB).
Yeah that kinda puts a damper on the whole site... but that's just because every access is now an SQL related call.
How can I put sub-transactions in my DTML to give others a chance to use the site?
This is not what ZODB sub-transactions do. Even if you were using a relational database that has a notion of sub-transactions (Oracle has 'nested transactions' for example) that would not stop the blocking (of course if you were using Oracle you would be using a level 3 DA...). ZODB sub-transactions allow changed objects to get flushed to a temp filestorage so that you can accumulate more object changes then can fit in virtual memory. There is no mapping of sub-transaction semantics to any of the DAs. In fact, if I remember correctly using ZODB sub-transactions with SQL methods is Not A Good Thing. I don't remember the exact details. Solutions? Execute a shorter query or upgrade to a concurrent DA. -Michel