2012-03-08 38 views
5

任何人都可以解釋我的錯誤 - 以及我如何修復它?ConflictError:數據庫衝突錯誤

我們使用:

  • Plone的4
  • Zope的19年2月12日
  • ZEO
  • ZODB-暫存

錯誤日誌

Site Error 

An error was encountered while publishing this resource. 

Sorry, a site error occurred. 

Traceback (innermost last): 

Module ZPublisher.Publish, line 239, in publish_module_standard 
Module ZPublisher.Publish, line 197, in publish 
Module ZPublisher.Publish, line 197, in publish 
Module ZPublisher.Publish, line 197, in publish 
Module ZPublisher.Publish, line 173, in publish 
Module plone.app.linkintegrity.monkey, line 17, in zpublisher_exception_hook_wrapper 
Module ZPublisher.Publish, line 135, in publish 
Module Zope2.App.startup, line 291, in commit 
Module transaction._manager, line 93, in commit 
Module transaction._transaction, line 322, in commit 
Module transaction._transaction, line 419, in _commitResources 
Module ZODB.Connection, line 767, in tpc_vote 
Module ZEO.ClientStorage, line 1068, in tpc_vote 
Module ZEO.ClientStorage, line 905, in _check_serials 

ConflictError: database conflict error (oid 0x08, class Products.Transience.Transience.Length2, serial this txn started with 0x0394fddba7126fbb 2012-03-08 07:23:39,157504, serial currently committed 0x0394fddbb0a4cb22 2012-03-08 07:23:41,400873) 

Troubleshooting Suggestions 

The URL may be incorrect. 
The parameters passed to this resource may be incorrect. 
A resource that this resource relies on may be encountering an error. 

For more detailed information about the error, please refer to the error log. 

If the error persists please contact the site maintainer. Thank you for your patience. 

我試圖修復Data.fs沒有任何錯誤...

在此先感謝。

+2

數據庫衝突錯誤可以f.e.如果交易無法完成,就會發生。這是一個開發或生產實例嗎?從什麼時候發生錯誤以及你之前做了什麼改變? – 2012-03-08 09:16:02

+0

這是一個生產服務器 錯誤隨機發生 - 當用戶打開瀏覽器視圖,一個簡單的文件夾或編輯器的作品... – user966660 2012-03-08 09:41:17

+0

@ user966660 - 在這個問題上的運氣?我正在處理完全相同的問題 - 它似乎與身份驗證/會話有關(0x08 oid在會話管理器的臨時存儲中) – 2012-06-19 08:06:13

回答

3

當兩個用戶同時嘗試更新同一對象(通常是同一目錄數據結構的一部分)並且系統無法解決衝突時,會發生衝突錯誤。您應該確保您的ZEO服務器包含Zope實例中的所有雞蛋,以確保您擁有所有衝突解決代碼。

如果你在簡單的視圖中看到這些,那麼這可能意味着你有一些代碼在渲染視圖時更新數據庫。這與ZODB不是一個好主意。

+0

_確保您的ZEO服務器包含來自Zope實例的所有egg_ - 是否需要?沒有找到任何文件。 [Zope2 wiki](http://wiki.zope.org/zope2/ZEOZopeEnterpriseObjects)說:注意:Data.fs保存在ZEO服務器中,所有產品都安裝在客戶端。 – 2012-04-10 07:27:41

+1

你說得對,在plone.recipe.zeoserver - _「eggs中創建文檔中找到它 - 如果你需要包含其他包作爲雞蛋,例如用於在ZEO服務器端提供用於執行衝突解決的應用程序代碼(通過_p_resolveConflict ()處理程序)。「_和Products.Transience中有這樣一個處理程序,現在是Zope的一部分2.12 egg – 2012-04-10 07:48:19

+0

@Laurence Rowe - 當你說」某些代碼在渲染該視圖時更新數據庫「,你的意思是ZODB? – Ravi 2014-03-19 14:41:21