Azure 网站与 OrchardCMS 导致 Http5xx 错误

本文关键字:Http5xx 错误 导致 OrchardCMS 网站 Azure | 更新日期: 2023-09-27 18:32:59

我使用OrchardCMS 1.8.1,前段时间错误报告已经到达。我尚未对代码或 Azure 网站设置进行任何更改,因此不了解要解决的问题。

这就是我在日志中看到的:

    2014-11-10 15:10:18,345 [47] NHibernate.Transaction.AdoTransaction - (null) - Begin transaction failed
 (null)
System.Data.SqlServerCe.SqlCeException (0x80004005): There is a file sharing violation. A different process might be using the file. [ D:'home'site'wwwroot'App_Data'Sites'Default'Orchard.sdf ]
   at System.Data.SqlServerCe.SqlCeConnection.ProcessResults(Int32 hr)
   at System.Data.SqlServerCe.SqlCeConnection.Open(Boolean silent)
   at System.Data.SqlServerCe.SqlCeConnection.Open()
   at NHibernate.Connection.DriverConnectionProvider.GetConnection() in c:'Users'sebros'Documents'My Projects'nhibernate-core'src'NHibernate'Connection'DriverConnectionProvider.cs:line 46
   at NHibernate.AdoNet.ConnectionManager.GetConnection() in c:'Users'sebros'Documents'My Projects'nhibernate-core'src'NHibernate'AdoNet'ConnectionManager.cs:line 196
   at NHibernate.Impl.SessionImpl.get_Connection() in c:'Users'sebros'Documents'My Projects'nhibernate-core'src'NHibernate'Impl'SessionImpl.cs:line 1634
   at NHibernate.Transaction.AdoTransaction.Begin(IsolationLevel isolationLevel) in c:'Users'sebros'Documents'My Projects'nhibernate-core'src'NHibernate'Transaction'AdoTransaction.cs:line 137

知道如何避免这种情况吗?

Azure 网站与 OrchardCMS 导致 Http5xx 错误

您可能对 SqlCe 数据库具有太多的并发写入访问权限,而该数据库不适合此访问。我可以排除另一个进程,例如防病毒软件,当您在 Azure 网站上提到文件时,它会保持打开状态。

尝试重新启动服务,并确保已启用输出缓存。最终使用可以更好地处理高并发场景的 SQL Server。