Method causing LOCK and stopping whole website
I have a control calling this method
App.WorkWith().Pages().LocatedIn(PageLocation.Frontend)
.Where(p => p.ApprovalWorkflowState.Value ==
"Published"
)
.Get()
Server Error in '/' Application.
Error executing query: Telerik.OpenAccess.RT.sql.SQLException: Lock request time out period exceeded.
at Telerik.OpenAccess.RT.Adonet2Generic.Impl.PreparedStatementImp.executeQuery()
at OpenAccessRuntime.Relational.conn.PooledPreparedStatement.executeQuery()
at OpenAccessRuntime.Relational.fetch.FetchResultImp.Execute()
SQL:
SELECT
TOP(??T) a.[id] AS COL1, a.[approval_workflow_state_] AS COL2,
a.[approval_workflow_state_en] AS COL3, a.[approval_workflow_state_es]
AS COL4, a.[approval_workflow_state_pt] AS COL5, a.[description_] AS
COL6, a.[description_en] AS COL7, a.[description_es] AS COL8,
a.[description_pt] AS COL9, a.[title_] AS COL10, a.[title_en] AS COL11,
a.[title_es] AS COL12, a.[title_pt] AS COL13, a.[url_name_] AS COL14,
a.[url_name_en] AS COL15, a.[url_name_es] AS COL16, a.[url_name_pt] AS
COL17, a.[app_name] AS COL18, a.[id2] AS COL19,
a.[can_inherit_permissions] AS COL20, a.[date_created] AS COL21,
a.[inherits_permissions] AS COL22, a.[last_modified] AS COL23, a.[nme]
AS COL24, a.[ordinal] AS COL25, a.[ownr] AS COL26, a.[content_id] AS
COL27, a.[parent_id] AS COL28, a.[render_as_link] AS COL29, a.[root_id]
AS COL30, a.[show_in_navigation] AS COL31, a.[voa_version] AS COL32 FROM
[sf_page_node] a WHERE a.[app_name] = ? AND
a.[nme] = ?
Description:
An unhandled exception occurred during the execution of the current web
request. Please review the stack trace for more information about the
error and where it originated in the code.
Exception
Details: Telerik.OpenAccess.Exceptions.LockNotGrantedException: Error
executing query: Telerik.OpenAccess.RT.sql.SQLException: Lock request
time out period exceeded.
at Telerik.OpenAccess.RT.Adonet2Generic.Impl.PreparedStatementImp.executeQuery()
at OpenAccessRuntime.Relational.conn.PooledPreparedStatement.executeQuery()
at OpenAccessRuntime.Relational.fetch.FetchResultImp.Execute()
SQL:
SELECT
TOP(??T) a.[id] AS COL1, a.[approval_workflow_state_] AS COL2,
a.[approval_workflow_state_en] AS COL3, a.[approval_workflow_state_es]
AS COL4, a.[approval_workflow_state_pt] AS COL5, a.[description_] AS
COL6, a.[description_en] AS COL7, a.[description_es] AS COL8,
a.[description_pt] AS COL9, a.[title_] AS COL10, a.[title_en] AS COL11,
a.[title_es] AS COL12, a.[title_pt] AS COL13, a.[url_name_] AS COL14,
a.[url_name_en] AS COL15, a.[url_name_es] AS COL16, a.[url_name_pt] AS
COL17, a.[app_name] AS COL18, a.[id2] AS COL19,
a.[can_inherit_permissions] AS COL20, a.[date_created] AS COL21,
a.[inherits_permissions] AS COL22, a.[last_modified] AS COL23, a.[nme]
AS COL24, a.[ordinal] AS COL25, a.[ownr] AS COL26, a.[content_id] AS
COL27, a.[parent_id] AS COL28, a.[render_as_link] AS COL29, a.[root_id]
AS COL30, a.[show_in_navigation] AS COL31, a.[voa_version] AS COL32 FROM
[sf_page_node] a WHERE a.[app_name] = ? AND
a.[nme] = ?
Source Error:
An
unhandled exception was generated during the execution of the current
web request. Information regarding the origin and location of the
exception can be identified using the exception stack trace below.
Stack Trace:
[LockNotGrantedException: Error executing query: Telerik.OpenAccess.RT.sql.SQLException: Lock request time out period exceeded.
at Telerik.OpenAccess.RT.Adonet2Generic.Impl.PreparedStatementImp.executeQuery()
at OpenAccessRuntime.Relational.conn.PooledPreparedStatement.executeQuery()
at OpenAccessRuntime.Relational.fetch.FetchResultImp.Execute()
SQL:
SELECT
TOP(??T) a.[id] AS COL1, a.[approval_workflow_state_] AS COL2,
a.[approval_workflow_state_en] AS COL3, a.[approval_workflow_state_es]
AS COL4, a.[approval_workflow_state_pt] AS COL5, a.[description_] AS
COL6, a.[description_en] AS COL7, a.[description_es] AS COL8,
a.[description_pt] AS COL9, a.[title_] AS COL10, a.[title_en] AS COL11,
a.[title_es] AS COL12, a.[title_pt] AS COL13, a.[url_name_] AS COL14,
a.[url_name_en] AS COL15, a.[url_name_es] AS COL16, a.[url_name_pt] AS
COL17, a.[app_name] AS COL18, a.[id2] AS COL19,
a.[can_inherit_permissions] AS COL20, a.[date_created] AS COL21,
a.[inherits_permissions] AS COL22, a.[last_modified] AS COL23, a.[nme]
AS COL24, a.[ordinal] AS COL25, a.[ownr] AS COL26, a.[content_id] AS
COL27, a.[parent_id] AS COL28, a.[render_as_link] AS COL29, a.[root_id]
AS COL30, a.[show_in_navigation] AS COL31, a.[voa_version] AS COL32 FROM
[sf_page_node] a WHERE a.[app_name] = ? AND
a.[nme] = ? ]
Telerik.Sitefinity.Data.Linq.Oql.OqlQueryProvider`2.ExecuteKnownType(IObjectScope
scope, String queryText, Boolean isEnumerable, Int32 skip, Int32 take,
IList parameters, ElementOperator op) +1633
Telerik.Sitefinity.Data.Linq.Oql.OqlQueryProvider`2.Execute(Expression expression) +897
Telerik.Sitefinity.Data.Linq.QueryProvider`2.System.Linq.IQueryProvider.Execute(Expression expression) +113
System.Linq.Queryable.FirstOrDefault(IQueryable`1 source, Expression`1 predicate) +580
Telerik.Sitefinity.Web.SiteMapBase.Initialize(String name, NameValueCollection attributes) +1171
Telerik.Sitefinity.Web.SiteMapBase.GetSiteMapProvider(String rootName) +395
Telerik.Sitefinity.Web.SitefinityRoute.GetRouteData(HttpContextBase httpContext) +60
System.Web.Routing.RouteCollection.GetRouteData(HttpContextBase httpContext) +370
System.Web.Routing.UrlRoutingModule.PostResolveRequestCache(HttpContextBase context) +75
System.Web.SyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +80
System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +266
Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.1
Hi Bruno Michels,
Unfortunately, we are not able to reproduce this error with version 4.1.1339 or 4.1.1395 (SP1 from Friday).
But looking in the stack trace, seems the exception is not related to executing the specified by you query - the error happens on in the SiteMap provider.
In the latest release (4.1 SP1) we fixed an issue with initializing the SiteMap provider, which could potentially cause this problem.
Can you try to reproduce the error with the latest service pack release? If you manage to do this, can you send us your project, so we could investigate it locally?
We are sorry for the inconvenience. Do let us know how it goes.
Kind regards,
Vlad
the Telerik team