Db connection drops
hi
i keep getting this errors after i surf to the sitefinity site i get two ditinctive errors
more info
Sql 2005 server
iis 7.5 on windows 2008 R2
never had this problem in our dev, qa, staging eniverments
using all kind of combination ( win 7 + sql 2008. windows 2008 + sql 2005, windows 2008 + sql 2008)
1)
Server Error in '/' Application.
--------------------------------------------------------------------------------
Telerik.OpenAccess.RT.sql.SQLException: Lock request time out period exceeded.
at Telerik.OpenAccess.RT.Adonet2Generic.Impl.ResultSetImp.next()
at OpenAccessRuntime.Relational.fetch.FetchResultImp.hasNext()
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: Telerik.OpenAccess.RT.sql.SQLException: Lock request time out period exceeded.
at Telerik.OpenAccess.RT.Adonet2Generic.Impl.ResultSetImp.next()
at OpenAccessRuntime.Relational.fetch.FetchResultImp.hasNext()
<H2><I>Invalid operation. The connection is closed.</I> </H2></SPAN><FONT
face="Arial, Helvetica, Geneva, SunSans-Regular, sans-serif "><B>Description:
</B>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. <BR><BR><B>Exception Details:
</B>System.InvalidOperationException: Invalid operation. The connection is
closed.<BR><BR><B>Source Error:</B> <BR><BR>
<TABLE width="100%" bgColor=#ffffcc>
<TBODY>
<TR>
<TD><CODE>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.</CODE>
</TD></TR></TBODY></TABLE><BR><B>Stack Trace:</B> <BR><BR>
<TABLE width="100%" bgColor=#ffffcc>
<TBODY>
<TR>
<TD><CODE><PRE>
<DIV dir=ltr>[InvalidOperationException: Invalid operation. The connection is closed.]
Telerik.OpenAccess.RT.Adonet2Generic.Impl.PreparedStatementImp.executeQuery() +573
OpenAccessRuntime.Relational.conn.PooledPreparedStatement.executeQuery() +85
OpenAccessRuntime.Relational.fetch.FetchResultImp.execute() +86
[DataStoreException: Error executing query: System.InvalidOperationException: Invalid operation. The connection is closed.
at Telerik.OpenAccess.RT.Adonet2Generic.Impl.PreparedStatementImp.executeQuery()
at OpenAccessRuntime.Relational.conn.PooledPreparedStatement.executeQuery()
at OpenAccessRuntime.Relational.fetch.FetchResultImp.execute()
SQL:
SELECT [approval_workflow_state_] AS COL1, [description_] AS COL2, [title_] AS COL3, [url_name_] AS COL4, [app_name] AS COL5, [id2] AS COL6, [can_inherit_permissions] AS COL7, [date_created] AS COL8, [inherits_permissions] AS COL9, [last_modified] AS COL10, [nme] AS COL11, [ordinal] AS COL12, [ownr] AS COL13, [content_id] AS COL14, [parent_id] AS COL15, [render_as_link] AS COL16, [root_id] AS COL17, [show_in_navigation] AS COL18, [voa_version] AS COL19 FROM [sf_page_node] WHERE [id] = ? System.InvalidOperationException: Invalid operation. The connection is closed.
at Telerik.OpenAccess.RT.Adonet2Generic.Impl.PreparedStatementImp.executeQuery()
at OpenAccessRuntime.Relational.conn.PooledPreparedStatement.executeQuery()
at OpenAccessRuntime.Relational.fetch.FetchResultImp.execute()]
Telerik.OpenAccess.RT.ExceptionWrapper.Throw() +13
OpenAccessRuntime.DataObjects.PCStateMan.handleException(Exception x) +106
OpenAccessRuntime.DataObjects.PCStateMan.getObjectFieldImp(PersistenceCapable pc, FieldMetaData fmd, Object currentValue) +183
Telerik.Sitefinity.Pages.Model.PageNode.get_RootNode() +86
Telerik.Sitefinity.Pages.Model.PageNode.get_IsBackend() +25
Telerik.Sitefinity.Model.Localization.LocalizationHelper.IsObjectForBackend(Object component) +306
Telerik.Sitefinity.Descriptors.LstringPropertyDescriptor.GetValue(Object component, CultureInfo culture, Boolean throwException) +41
Telerik.Sitefinity.Descriptors.LstringPropertyDescriptor.GetString(Object component, CultureInfo culture, Boolean fallback) +137
Telerik.Sitefinity.Model.Lstring.get_Value() +106
Telerik.Sitefinity.Web.PageSiteNode..ctor(SiteMapBase provider, PageNode pageNode) +1937
Telerik.Sitefinity.Web.SiteMapBase.GetChildNodes(SiteMapNode node, Boolean ifAccessible) +625
Telerik.Sitefinity.Web.SiteMapBase.FindSegment(SiteMapNode parent, Int32 segmentIndex, IList`1 segments, String segment, SiteMapNode& node, Boolean& exactLanguageVersionFound, Boolean checkAllLanguages) +144
Telerik.Sitefinity.Web.SiteMapBase.FindSiteMapNode(String rawUrl, Boolean ifAccessible, Boolean fallbackToOtherLanguageVersion, Boolean& isExactMatch) +1547
Telerik.Sitefinity.Web.SiteMapBase.FindSiteMapNode(String rawUrl, Boolean ifAccessible) +33
Telerik.Sitefinity.Web.SitefinityRoute.GetRouteData(HttpContextBase httpContext) +461
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
</DIV></PRE></CODE></TD></TR></TBODY></TABLE><BR>
<HR color=silver SIZE=1 width="100%">
<B>Version Information:</B> Microsoft .NET Framework Version:4.0.30319;
ASP.NET Version:4.0.30319.1 </FONT><!--
[InvalidOperationException]: Invalid operation. The connection is closed.
at Telerik.OpenAccess.RT.Adonet2Generic.Impl.PreparedStatementImp.executeQuery()
at OpenAccessRuntime.Relational.conn.PooledPreparedStatement.executeQuery()
at OpenAccessRuntime.Relational.fetch.FetchResultImp.execute()
[DataStoreException]: Error executing query: System.InvalidOperationException: Invalid operation. The connection is closed.
at Telerik.OpenAccess.RT.Adonet2Generic.Impl.PreparedStatementImp.executeQuery()
at OpenAccessRuntime.Relational.conn.PooledPreparedStatement.executeQuery()
at OpenAccessRuntime.Relational.fetch.FetchResultImp.execute()
SQL:
SELECT [approval_workflow_state_] AS COL1, [description_] AS COL2, [title_] AS COL3, [url_name_] AS COL4, [app_name] AS COL5, [id2] AS COL6, [can_inherit_permissions] AS COL7, [date_created] AS COL8, [inherits_permissions] AS COL9, [last_modified] AS COL10, [nme] AS COL11, [ordinal] AS COL12, [ownr] AS COL13, [content_id] AS COL14, [parent_id] AS COL15, [render_as_link] AS COL16, [root_id] AS COL17, [show_in_navigation] AS COL18, [voa_version] AS COL19 FROM [sf_page_node] WHERE [id] = ? System.InvalidOperationException: Invalid operation. The connection is closed.
at Telerik.OpenAccess.RT.Adonet2Generic.Impl.PreparedStatementImp.executeQuery()
at OpenAccessRuntime.Relational.conn.PooledPreparedStatement.executeQuery()
at OpenAccessRuntime.Relational.fetch.FetchResultImp.execute()
at Telerik.OpenAccess.RT.ExceptionWrapper.Throw()
at OpenAccessRuntime.DataObjects.PCStateMan.handleException(Exception x)
at OpenAccessRuntime.DataObjects.PCStateMan.getObjectFieldImp(PersistenceCapable pc, FieldMetaData fmd, Object currentValue)
at Telerik.Sitefinity.Pages.Model.PageNode.get_RootNode()
at Telerik.Sitefinity.Pages.Model.PageNode.get_IsBackend()
at Telerik.Sitefinity.Model.Localization.LocalizationHelper.IsObjectForBackend(Object component)
at Telerik.Sitefinity.Descriptors.LstringPropertyDescriptor.GetValue(Object component, CultureInfo culture, Boolean throwException)
at Telerik.Sitefinity.Descriptors.LstringPropertyDescriptor.GetString(Object component, CultureInfo culture, Boolean fallback)
at Telerik.Sitefinity.Model.Lstring.get_Value()
at Telerik.Sitefinity.Web.PageSiteNode..ctor(SiteMapBase provider, PageNode pageNode)
at Telerik.Sitefinity.Web.SiteMapBase.GetChildNodes(SiteMapNode node, Boolean ifAccessible)
at Telerik.Sitefinity.Web.SiteMapBase.FindSegment(SiteMapNode parent, Int32 segmentIndex, IList`1 segments, String segment, SiteMapNode& node, Boolean& exactLanguageVersionFound, Boolean checkAllLanguages)
at Telerik.Sitefinity.Web.SiteMapBase.FindSiteMapNode(String rawUrl, Boolean ifAccessible, Boolean fallbackToOtherLanguageVersion, Boolean& isExactMatch)
at Telerik.Sitefinity.Web.SiteMapBase.FindSiteMapNode(String rawUrl, Boolean ifAccessible)
at Telerik.Sitefinity.Web.SitefinityRoute.GetRouteData(HttpContextBase httpContext)
at System.Web.Routing.RouteCollection.GetRouteData(HttpContextBase httpContext)
at System.Web.Routing.UrlRoutingModule.PostResolveRequestCache(HttpContextBase context)
at System.Web.HttpApplication.SyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)
--></BODY></HTML>
Hello gilad,
This is a known issue with loosing the database connection. Unfortunately it doesn't disappear when the database server is up, and you have to restart the application. Here is a related thread about this issue:
http://www.sitefinity.com/devnet/forums/sitefinity-4-x/general-discussions/database-connection-closed.aspx
We are still investigation the problem.
Greetings,
Vlad
the Telerik team
What is the fix, please?
I'm setting up sitefinity on a new server and setting up the first site,
all the first few steps, db etc., go fine then
when I get to adding the first user I am getting this error too.
Invalid operation. The connection is closed.
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:
System.InvalidOperationException: Invalid operation. The connection is
closed.
[updated]
or I'm also getting this error
Invalid object name 'sf_roles'.<br>Statement(s) could not be prepared.
Invalid object name 'sf_roles'.
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.
Statement(s) could not be
prepared.
Exception Details:
Telerik.OpenAccess.RT.sql.SQLException: Invalid object name
'sf_roles'.
Statement(s) could not be prepared.
Hello gilad,
Since the problem was in OpenAccess, it was partially fixed in Sitefinity 4.0 SP.
However, now it is finally fixed in OpenAccess and will be included in the upcoming 4.1 SP1.
Kind regards,
Vlad
the Telerik team
Hi,
I have the same issue with Sitefinity 4.3.
Here's a stack trace example (not sure if I've left sensitive data below, please edit it out if I did):
02/21/2012 10:35:08
Type : Telerik.OpenAccess.Exceptions.LockNotGrantedException, Telerik.OpenAccess, Version=2011.2.713.3, Culture=neutral, PublicKeyToken=7ce17eeaf1d59342
Message : Telerik.OpenAccess.RT.sql.SQLException: Lock request time out period exceeded.
at Telerik.OpenAccess.RT.Adonet2Generic.Impl.ResultSetImp.next()
at OpenAccessRuntime.Relational.fetch.FetchResultImp.rsNext()
at OpenAccessRuntime.Relational.fetch.FetchResultImp.hasNext()
Source : Telerik.OpenAccess.Runtime
Help link :
InnerExceptions :
FailedObject :
BackendError :
Reason : ObjectLocked
CanRetry : True
Data : System.Collections.ListDictionaryInternal
TargetSite : System.Exception Throw()
Stack Trace : at Telerik.OpenAccess.RT.ExceptionWrapper.Throw()
at OpenAccessRuntime.storagemanager.logging.LoggingStorageManager.executeQueryAll(ApplicationContext context, ImmutableQueryDetails query, CompiledQuery compiledQuery, QueryParameters parameters, Int32 skip, Int32 take)
at OpenAccessRuntime.DataObjects.UnsynchronizedPMProxy.getAllQueryResults(CompiledQuery cq, QueryParameters parameters, Int32 skip, Int32 take)
at OpenAccessRuntime.DataObjects.ForwardQueryResult.Resolve()
at OpenAccessRuntime.DataObjects.ForwardQueryResult.Initialize(Int32 indexParam)
at OpenAccessRuntime.DataObjects.ForwardQueryResult.get_Item(Int32 indexParam)
at Telerik.OpenAccess.RT.ListEnumerator.setCurrent(Int32 _pos)
at Telerik.OpenAccess.RT.ListEnumerator.Move(Int32 relative)
at Telerik.OpenAccess.RT.ListEnumerator.MoveNext()
at Telerik.OpenAccess.Query.TypedEnumerator`1.MoveNext()
at Telerik.Sitefinity.Data.Linq.DataItemEnumerator`1.MoveNext()
at Telerik.Sitefinity.Web.SiteMapBase.GetChildNodes(SiteMapNode parent, Boolean ifAccessible)
at Telerik.Sitefinity.Web.SiteMapBase.GetChildNodes(SiteMapNode node)
at System.Web.SiteMapNode.get_ChildNodes()
at System.Web.SiteMapNode.get_HasChildNodes()
at Telerik.Sitefinity.Web.UI.Backend.MainMenu.IsNodeEmpty(PageSiteNode node)
at Telerik.Sitefinity.Web.UI.Backend.MainMenu.<
IsNodeEmpty
>b__1(PageSiteNode c)
at System.Linq.Enumerable.WhereArrayIterator`1.MoveNext()
at System.Linq.Enumerable.Count[TSource](IEnumerable`1 source)
at Telerik.Sitefinity.Web.UI.Backend.MainMenu.IsNodeEmpty(PageSiteNode node)
at Telerik.Sitefinity.Web.UI.Backend.MainMenu.<
IsNodeEmpty
>b__1(PageSiteNode c)
at System.Linq.Enumerable.WhereArrayIterator`1.MoveNext()
at System.Linq.Enumerable.Count[TSource](IEnumerable`1 source)
at Telerik.Sitefinity.Web.UI.Backend.MainMenu.IsNodeEmpty(PageSiteNode node)
at Telerik.Sitefinity.Web.UI.Backend.MainMenu.CreateRadMenuItemFromNode(SiteMapNode node)
at Telerik.Sitefinity.Web.UI.Backend.MainMenu.OnLoad(EventArgs e)
at System.Web.UI.Control.LoadRecursive()
at System.Web.UI.Control.LoadRecursive()
at System.Web.UI.Control.LoadRecursive()
at System.Web.UI.Control.LoadRecursive()
at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
Additional Info:
MachineName : SRVPARMUT23
TimeStamp : 2/21/2012 9:35:08 AM
FullName : Telerik.Sitefinity.Utilities, Version=4.3.1885.0, Culture=neutral, PublicKeyToken=b28c218413bdf563
AppDomainName : /LM/W3SVC/198719134/Root/V3-1-129742561033331357
ThreadIdentity : sarah.bittner
WindowsIdentity : (...)
Requested URL : http://(...)/Sitefinity/Pages
Category: ErrorLog
Priority: 0
EventId: 90000
Severity: Error
Title:Enterprise Library Exception Handling
Machine: SRVPARMUT23
App Domain: /LM/W3SVC/198719134/Root/V3-1-129742561033331357
ProcessId: 4672
Process Name: c:\windows\system32\inetsrv\w3wp.exe
Thread Name:
Win32 ThreadId:5592
Extended Properties:
----------------------------------------
Hi,
This is a different error - Lock request time out period exceeded.
.
Do you have custom backend page and custom widgets on them? The stack shows that you are navigating to the backend pages and when a backend node is requested a lock error occurs. Most probably there are some other requests at the same time for this node?
Regards,
Ivan Dimitrov
the Telerik team
Hi,
Since I also got a LockNotGrantedException, I thought it belonged here. If you'd prefer me to start a new thread, let me know.
I do not have a custom backend page. By the way, on the stack trace I showed, it happened on the pages index of the back office, but I see it can also happen when editing a page (mypage/Action/Edit).
By the way, I actually have many more errors (in App_Data/Sitefinity/Logs/Error.log), but don't know which ones are critical. I could attach the Error.log files to a support ticket if it's useful.
Let me know if I can do anything to let us debug further.
Thanks.
Hello,
Do you get yellow screens. It is possible that the lock timeout has exceeded then reset and the query is made again. The way that I am able to replicate this issue and get yellow screen is when I try to make an operation that makes a big query to the database. For example to put into a single transaction deleting or creating of more than 2000 items.
Kind regards,
Ivan Dimitrov
the Telerik team
Hi,
By "yellow screens", do you mean exception pages? I did not get any, but then again, I'm not the one triggering the errors. I only find out about them from the logs. I'm pretty sure users weren't making heavy operations, and only viewing pages or editing a single one.
I found out an oversight on our part, as in the web.config, we left the compilation element to debug="true". We're going to fix this, and hopefully, this will fix lock-related issues. If not, I'll post back.
Thanks.
Hi,
It's still happening despite the removal of the debug flag.
Telerik.OpenAccess.RT.sql.SQLException: Lock request time out period exceeded. at Telerik.OpenAccess.RT.Adonet2Generic.Impl.ResultSetImp.next() at OpenAccessRuntime.Relational.fetch.FetchResultImp.rsNext() at OpenAccessRuntime.Relational.fetch.FetchResultImp.hasNext()
var entityPage = App.WorkWith()
.Pages()
.LocatedIn(Telerik.Sitefinity.Fluent.Pages.PageLocation.Frontend)
.ThatArePublished()
.Where(p => p.GetFullUrl().Equals(pageUrl, StringComparison.OrdinalIgnoreCase))
.Get()
.SingleOrDefault();
// (...)
var page = entityPage.Nodes.FirstOrDefault(p => p.UrlName.Equals(pageUrl, StringComparison.OrdinalIgnoreCase));
// (...)
var subPages = page.Nodes.Where(p => p.ShowInNavigation);