- Umbraco v 4.0.0 (Assembly version: 1.0.3317.32692) - MySQL - ASP .NET 3.5 - XP and IIS 5.1
The problem is that the content tree is timing out and not displaying anything other than the top (Content) node. Is there anyway to extend the connection timeout that Umbraco uses when connecting to the db?
Thanks,
Alex
The stack trace I get is as follows:
[MySqlException]: Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding. at MySql.Data.MySqlClient.MySqlCommand.ExecuteReader(CommandBehavior behavior) at MySql.Data.MySqlClient.MySqlHelper.ExecuteReader(MySqlConnection connection, MySqlTransaction transaction, String commandText, MySqlParameter[] commandParameters, Boolean ExternalConn) at MySql.Data.MySqlClient.MySqlHelper.ExecuteReader(String connectionString, String commandText, MySqlParameter[] commandParameters) at umbraco.DataLayer.SqlHelpers.MySql.MySqlHelper.ExecuteReader(String commandText, MySqlParameter[] parameters) at umbraco.DataLayer.SqlHelper`1.ExecuteReader(String commandText, IParameter[] parameters) [SqlHelperException]: Umbraco Exception (DataLayer): SQL helper exception in ExecuteReader at umbraco.DataLayer.SqlHelper`1.ExecuteReader(String commandText, IParameter[] parameters) at umbraco.cms.businesslogic.web.Document.GetChildrenForTree(Int32 NodeId) at umbraco.cms.presentation.Trees.BaseContentTree.Render(XmlTree& Tree) at umbraco.loadContent.Render(XmlTree& Tree) at umbraco.cms.presentation.tree.LoadTree(String treeAlias) at umbraco.cms.presentation.tree.Page_Load(Object sender, EventArgs e) at System.Web.Util.CalliHelper.EventArgFunctionCaller(IntPtr fp, Object o, Object t, EventArgs e) at System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e) at System.Web.UI.Control.OnLoad(EventArgs e) at umbraco.BasePages.BasePage.OnLoad(EventArgs e) at System.Web.UI.Control.LoadRecursive() at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) [HttpUnhandledException]: Exception of type 'System.Web.HttpUnhandledException' was thrown. at System.Web.UI.Page.HandleError(Exception e) at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) at System.Web.UI.Page.ProcessRequest(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) at System.Web.UI.Page.ProcessRequest() at System.Web.UI.Page.ProcessRequestWithNoAssert(HttpContext context) at System.Web.UI.Page.ProcessRequest(HttpContext context) at ASP.umbraco_tree_aspx.ProcessRequest(HttpContext context) in c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\root\80eb830a\34fd6ea9\App_Web_tree.aspx.5f2dec3.ne0qnsm3.0.cs:line 0 at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)
I've done a couple of sites with umbraco already, and have found it really great.
I have a job on at the moment for a client who has a catalogue of several thousand items. I am intending to do this job with umbraco, and started out doing some testing with umbraco, to see how things went when I loaded it up with a few thousand nodes.
My plan was to add 10 nodes, then for each of those 10 nodes create about 1000 child nodes.
I got to about 4000 nodes in umbraco then my content tree stopped working.
It was working with 4000 unpublished nodes but taking a while to load. (Around 20 secs).
I published 1000 of the nodes, then it stopped working.
I am getting the same problem described here with my content tree.
After watching the XHR response with firebug, I am also getting a timeout exception with MySQL.
I indexed the fields mentioned in this thread in my database, but I'm still getting the timeout errors.
When I indexed the fields in MySQL administrator, I went to edit table, then added the fields into the index list. I'm not sure if that is all you need to do, maybe I'm missing a step somewhere?
Interestingly I tried doing the same test, creating all the nodes, on my home machine, using MS SQL server express 2005, and it all works perfectly. I didn't have to even look at indexing fields.
I also noticed that when I was creating all the nodes on my home machine, it seemed to create them much quicker. I don't know if its relevant, but my home machine is running xp whereas my work machine runs vista. Aside from that, the two machines are a similar spec.
Any assistance you chaps could offer to help me get to the bottom of why the content tree is not loading would be greatly appreciated.
Just for information purposes; we had this behaviour and exception and adding the database indexes described above did solve the problem. This was based on using a SQL Server 2000 database.
I have uploaded a patch to codeplex ID: 7083, that contains the code + a release build of the umbraco.datalayer.dll, also the MySQL scripts can be run manually
Here is the MySQL syntax for the index on the 'cmsdocument' table, thanx to Spyros for pointing the missing index. CREATE UNIQUE INDEX IX_nodeid_versionid ON cmsdocument (NODEID, VERSIONID);
Content Tree Timeout
Hi there I'm using:
- Umbraco v 4.0.0 (Assembly version: 1.0.3317.32692)
- MySQL
- ASP .NET 3.5
- XP and IIS 5.1
The problem is that the content tree is timing out and not displaying anything other than the top (Content) node. Is there anyway to extend the connection timeout that Umbraco uses when connecting to the db?
Thanks,
Alex
The stack trace I get is as follows:
[MySqlException]: Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding.
at MySql.Data.MySqlClient.MySqlCommand.ExecuteReader(CommandBehavior behavior)
at MySql.Data.MySqlClient.MySqlHelper.ExecuteReader(MySqlConnection connection, MySqlTransaction transaction, String commandText, MySqlParameter[] commandParameters, Boolean ExternalConn)
at MySql.Data.MySqlClient.MySqlHelper.ExecuteReader(String connectionString, String commandText, MySqlParameter[] commandParameters)
at umbraco.DataLayer.SqlHelpers.MySql.MySqlHelper.ExecuteReader(String commandText, MySqlParameter[] parameters)
at umbraco.DataLayer.SqlHelper`1.ExecuteReader(String commandText, IParameter[] parameters)
[SqlHelperException]: Umbraco Exception (DataLayer): SQL helper exception in ExecuteReader
at umbraco.DataLayer.SqlHelper`1.ExecuteReader(String commandText, IParameter[] parameters)
at umbraco.cms.businesslogic.web.Document.GetChildrenForTree(Int32 NodeId)
at umbraco.cms.presentation.Trees.BaseContentTree.Render(XmlTree& Tree)
at umbraco.loadContent.Render(XmlTree& Tree)
at umbraco.cms.presentation.tree.LoadTree(String treeAlias)
at umbraco.cms.presentation.tree.Page_Load(Object sender, EventArgs e)
at System.Web.Util.CalliHelper.EventArgFunctionCaller(IntPtr fp, Object o, Object t, EventArgs e)
at System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e)
at System.Web.UI.Control.OnLoad(EventArgs e)
at umbraco.BasePages.BasePage.OnLoad(EventArgs e)
at System.Web.UI.Control.LoadRecursive()
at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
[HttpUnhandledException]: Exception of type 'System.Web.HttpUnhandledException' was thrown.
at System.Web.UI.Page.HandleError(Exception e)
at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
at System.Web.UI.Page.ProcessRequest(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
at System.Web.UI.Page.ProcessRequest()
at System.Web.UI.Page.ProcessRequestWithNoAssert(HttpContext context)
at System.Web.UI.Page.ProcessRequest(HttpContext context)
at ASP.umbraco_tree_aspx.ProcessRequest(HttpContext context) in c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\root\80eb830a\34fd6ea9\App_Web_tree.aspx.5f2dec3.ne0qnsm3.0.cs:line 0
at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)
Hi Alex,
Is there a lot of data (content, members, media) in the system?
Greets,
Gerben
Hi Gerben,
There is a section of the content hierarchy that looks like this:
- Bulletins
- A bulletin page yet to be archived
- Another bulletin page yet to be archived
- Yet another bulletin page yet to be archived
- ...
- 2009 Archive
- 2008 Archive
- 2007 Archive
- 2006 Archive
- 2005 Archive
- Search
The archive folders have up to 200 items in them each.
A bulletin is a custom media type I have created with several fields.
Also, there are a few hundred members and several hundred other media items such as images and pdfs etc.
The timeout has only started happening since the population of the Bulletins node.
Thanks,
Alex
Does anybody know of a way to override the default database command timeout, or even what it is in Umbraco?
Thanks,
Alex
Hi Alex,
It doesn't look like a lot of content. What you could give a try is:
Create two indexes:
NodeId in table cmsContent
ContentId in table cmsContentVersion
I found this out when loadtesting the membershop capabilities in Umbraco (see this topic: http://our.umbraco.org/forum/developers/api-questions/3117-Umbraco-Membership-Provider-for-large-ammounts-of-users)
Let me know if this is of any help to you!
Greets,
Gerben
Hi Gerben,
The index on cmsContent for NodeID already existed. However the index on cmsContentVersion for ContentID did not and that solved the problem for me.
The content tree is now returning in less than a second.
Thanks a lot for your help.
Alex
Hi,
I've done a couple of sites with umbraco already, and have found it really great.
I have a job on at the moment for a client who has a catalogue of several thousand items. I am intending to do this job with umbraco, and started out doing some testing with umbraco, to see how things went when I loaded it up with a few thousand nodes.
My plan was to add 10 nodes, then for each of those 10 nodes create about 1000 child nodes.
I got to about 4000 nodes in umbraco then my content tree stopped working.
It was working with 4000 unpublished nodes but taking a while to load. (Around 20 secs).
I published 1000 of the nodes, then it stopped working.
I am getting the same problem described here with my content tree.
After watching the XHR response with firebug, I am also getting a timeout exception with MySQL.
I indexed the fields mentioned in this thread in my database, but I'm still getting the timeout errors.
When I indexed the fields in MySQL administrator, I went to edit table, then added the fields into the index list. I'm not sure if that is all you need to do, maybe I'm missing a step somewhere?
Interestingly I tried doing the same test, creating all the nodes, on my home machine, using MS SQL server express 2005, and it all works perfectly. I didn't have to even look at indexing fields.
I also noticed that when I was creating all the nodes on my home machine, it seemed to create them much quicker. I don't know if its relevant, but my home machine is running xp whereas my work machine runs vista. Aside from that, the two machines are a similar spec.
Any assistance you chaps could offer to help me get to the bottom of why the content tree is not loading would be greatly appreciated.
My set up is:
-Umbraco 4.0.2.1
-Vista + IIS 7
-MySQL 5.1.11
Thanks
Jim
Just for information purposes; we had this behaviour and exception and adding the database indexes described above did solve the problem. This was based on using a SQL Server 2000 database.
There is a performance issue in the MySQL DB with Umbraco, see: http://our.umbraco.org/forum/core/general/3945-Content-Tree-not-loading?p=1#comment49105 and add the index:
/* Create Custom Index to speed up tree loading */
CREATE INDEX IX_contentid_versiondate ON cmscontentversion(CONTENTID, VERSIONDATE);
This will speed up the loading of the content tree in Umbraco when using MySQL
I have uploaded a patch to codeplex ID: 7083, that contains the code + a release build of the umbraco.datalayer.dll, also the MySQL scripts can be run manually
I had the same problem but on SQL Server. I don't know how the syntax is on MySQL but here is the index to solve your problem
http://www.spyriadis.net/2011/09/umbraco-fix-content-tree-not-loaded-on-very-large-sites/
Here is the MySQL syntax for the index on the 'cmsdocument' table, thanx to Spyros for pointing the missing index.
CREATE UNIQUE INDEX IX_nodeid_versionid ON cmsdocument (NODEID, VERSIONID);
is working on a reply...