Method causing LOCK and stopping whole website

Posted by Community Admin on 03-Aug-2018 18:21

Method causing LOCK and stopping whole website

All Replies

Posted by Community Admin on 11-May-2011 00:00

I have a control calling this method

App.WorkWith().Pages().LocatedIn(PageLocation.Frontend)
                .Where(p => p.ApprovalWorkflowState.Value == "Published")
                .Get()

It is causing a LOCK. The website has 3 languages:  pt (primary) | en | es

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


My website stops responding and I have to STOP and then START the application.

How can I retrieve the pages without causing this lock? How can I prevent the application from getting stuck like this?

Posted by Community Admin on 16-May-2011 00:00

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

Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items

This thread is closed