Re: Using substanced with Zeo and keep getting database conflict errors
"Jens W. Klein" <[email protected]>
| Newsgroups | gmane.comp.web.zope.zodb |
|---|---|
| Organization | Klein & Partner KG |
| Message-ID | <[email protected]> |
On 2016-09-13 16:13, Jo Gilder wrote: > as far as I am aware, I am committing the transaction after every write > but I will check. You may need to delay the addition of data slighly to give the web frontend a chance to write and resolve conflicts. Are there often unresolved conflicts? > What do you mean by writes on read? Do you mean > updating the zodb even when just viewing the data? Exact. I had this once with lots of conflicts on higher loads. So double checking is never wrong. Conflicts are happen often in indexes/catalogs and other places both, web and bash side, need to write objects (like BTree buckets, parent folders). I.e. it may help to delaying indexing of the imported objects if this is possible. Jens > > On Tuesday, 13 September 2016 15:09:40 UTC+1, Jens W. Klein wrote: > > On 2016-09-13 15:48, Jo Gilder wrote: > > This is happening when I try and add data programatically from a bash > > file running a python script at the same time as I add data via a web > > interface. Any ideas? > > > > While programmatically adding data you may create a very long running > transactions. Those probably conflict with the web writes. > In order to avoid this do commits often like so (time based or after a > specific number of additions): > > import transaction > transaction.commit() > > You may also want to check if your web interfaces does writes-on-read > for some reason on every or some requests, which one should avoid. > > Jens Klein -- Klein & Partner KG, member of BlueDynamics Alliance -- You received this message because you are subscribed to the Google Groups "zodb" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.