+1-888-365-2779
Try Now
More in this section

Forums / 3.x Pre-release forums (retired) / Server Error in a Load balanced environment

Server Error in a Load balanced environment

8 posts, 0 answered
  1. hibri
    hibri avatar
    12 posts
    Registered:
    06 Dec 2006
    03 Apr 2007
    Link to this post
    Hi,
    I'm testing sitefinity on a load balanced environment, and coming across intermittent server errors.

    The error occurs when content is being added. Once the server error occurs the site does not recover and needs an application restart. I have been able to reproduce on a single server with the application pool configured to use 2 worker threads, thus simulating a web garden. Is there something I can do to fix this ?

    The environment:
    DB : SQL server 2000 SP4 on Windows 2003.
    Load balanced webservers : Windows 2003 running IIS 6.0

    the stack trace is below.
    ----------------------------------------------------------------------------------------
    ExecuteReader requires an open and available Connection. The connection's current state 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: ExecuteReader requires an open and available Connection. The connection's current state is closed.

    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:


    [InvalidOperationException: ExecuteReader requires an open and available Connection. The connection's current state is closed.]
    System.Data.SqlClient.SqlConnection.GetOpenConnection(String method) +857076
    System.Data.SqlClient.SqlConnection.ValidateConnectionForExecute(String method, SqlCommand command) +9
    System.Data.SqlClient.SqlCommand.ValidateCommand(String method, Boolean async) +56
    System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, DbAsyncResult result) +73
    System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method) +32
    System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior behavior, String method) +122
    System.Data.SqlClient.SqlCommand.ExecuteDbDataReader(CommandBehavior behavior) +12
    System.Data.Common.DbCommand.System.Data.IDbCommand.ExecuteReader() +9
    Nolics.ORMapper.DataProviders.SQLBlockBuilder.EndStatement(SQLCommandEventArgs args, DataRow row) +389
    Nolics.ORMapper.DataProviders.SQLBlockBuilder.ExecCommandProcedure(StmtContext context, DataRow data) +779
    Nolics.ORMapper.DataProviders.SQLBlockBuilder.ExecutePKQuery(OdbClassInfo classInfo, DataRow pkData) +147
    Nolics.ORMapper.DataProviders.SQLDataProvider.ExecuteKeyQuery(DataSet queries, Boolean fPrimaryKey) +247
    Nolics.ORMapper.DataProviders.SQLDataProvider.QueryByPrimaryKey(DataSet keys) +7
    Nolics.ORMapper.Base.PrimeryKeyQuery.LoadPKQuery() +38
    Nolics.ORMapper.Base.OdbClass.LoadByPrimaryKey(IOdbClass primaryKey, OdbDataProvider provider, ObDataCache cache) +76
    Nolics.ORMapper.Base.OdbClass.LoadByPrimaryKey(IOdbClass primaryKey) +37
    Telerik.Cms.NolicsCmsProvider.GetPage(Guid id) +54
    Telerik.Cms.CmsManager.GetPage(Guid id) +26
    Telerik.Cms.Web.CmsHttpModule.GetEntryPoint(Guid id, String pageMode) +119
    Telerik.Cms.Web.CmsHttpModule.NavigateToPage(Guid id, String query, String appendQuery, String pageMode) +133
    Telerik.Cms.Web.CmsHttpModule.BeginRequest(Object sender, EventArgs e) +1179
    System.Web.SyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +92
    System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +64



  2. Bob
    Bob avatar
    330 posts
    Registered:
    24 Sep 2012
    03 Apr 2007
    Link to this post
    Hello Hibri,

    The support for web farms and web gardens is planned for version 3.1. Sitefinity 3.0 should work fine in load balanced environment as long as you do not edit pages and content. Unfortunately, there is no workaround for now. The only solution would be to have a staging server for editing and copying periodically the site to web farm servers. This could be done with some third party software for mirroring files and databases.

    Best wishes,
    Bob
    the telerik team

    Instantly find answers to your questions at the new telerik Support Center
  3. hibri
    hibri avatar
    12 posts
    Registered:
    06 Dec 2006
    03 Apr 2007
    Link to this post
    Hi Bob,
    Thanks for the reply.

    Do you have a time frame for having 3.1 ? is there a way this can be done in the final release ?
    We are developing a sitefinity solution for a major bank in UK, and nearing final release.

    The problem with using a staging server is that the sitefinity instance running on the other server does not pickup changes immediately. This seems to be because the content is cached in memory. this issue was reported in the forum earlier.
    If we go with having a staging server, is there a way to tell sitefinity to pickup the new changes from the DB ? manually expire the cache ?

    thanks in advance..
  4. Bob
    Bob avatar
    330 posts
    Registered:
    24 Sep 2012
    03 Apr 2007
    Link to this post
    Hello hibri,

    The time frame for 3.1 has not been set yet. We will try to pull the web farm support for 3.0. But we are still experiencing problems with medium trust and further delay is expected.
    Automatic synchronization between multiple sites is also planned for either 3.1 or 3.2. It is still uncertain in which version it will go.

    Greetings,
    Bob
    the telerik team

    Instantly find answers to your questions at the new telerik Support Center
  5. hibri
    hibri avatar
    12 posts
    Registered:
    06 Dec 2006
    11 Apr 2007
    Link to this post
    We've put two major sites using Sitefinity in production this week. I've worked around the web farm issue by using the admin on a dedicated non-load balanced server. All sitefinity instances point to the same database.
    However, I'm still running into this issue, which means it occurs even in a non-loadbalanced environment. The nastiness of this issue is that sitefinity does not recover from this.

    Does sitefinity use just one open DB connection for the AppDomain ? Doesn't SF try to open a new connection if the existing connection is closed ?

    I'm also getting another issue. Please find the excpetion details below. Please note that there is only one page named home.aspx, so I don't see why this error   should occur.

    Stack trace: at System.Web.StaticSiteMapProvider.AddNode(SiteMapNode node, SiteMapNode parentNode)
    at Telerik.Cms.Web.CmsSiteMapProvider.BuildSiteMap()
    at Telerik.Cms.Web.CmsSiteMapProvider.GetRootNodeCore()
    at System.Web.SiteMapProvider.get_RootNode()
    at System.Web.UI.WebControls.SiteMapDataSource.GetNodes()
    at System.Web.UI.WebControls.SiteMapDataSource.GetTreeView(String viewPath)
    at System.Web.UI.WebControls.SiteMapDataSource.GetHierarchicalView(String viewPath)
    at System.Web.UI.HierarchicalDataSourceControl.System.Web.UI.IHierarchicalDataSource.GetHierarchicalView(String viewPath)
    at System.Web.UI.WebControls.HierarchicalDataBoundControl.GetData(String viewPath)
    at System.Web.UI.WebControls.Menu.DataBindItem(MenuItem item)
    at System.Web.UI.WebControls.Menu.PerformDataBinding()
    at System.Web.UI.WebControls.HierarchicalDataBoundControl.PerformSelect()
    at System.Web.UI.WebControls.BaseDataBoundControl.DataBind()
    at System.Web.UI.WebControls.Menu.DataBind()
    at System.Web.UI.WebControls.BaseDataBoundControl.EnsureDataBound()
    at System.Web.UI.WebControls.Menu.EnsureDataBound()
    at System.Web.UI.WebControls.Menu.OnPreRender(EventArgs e, Boolean registerScript)
    at System.Web.UI.WebControls.Adapters.MenuAdapter.OnPreRender(EventArgs e)
    at System.Web.UI.Control.PreRenderRecursiveInternal()
    at System.Web.UI.Control.PreRenderRecursiveInternal()
    at System.Web.UI.Control.PreRenderRecursiveInternal()
    at System.Web.UI.Control.PreRenderRecursiveInternal()
    at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)


    Thanks in advance
    Hibri
  6. Hrisi
    Hrisi avatar
    34 posts
    Registered:
    02 Dec 2016
    11 Apr 2007
    Link to this post
    Hi Hibri,

    About your first question about the DB connections - we use the standard Connection poll. You can configure it through the web.config.

    The second problem is difficult to predict, because we can't see the exact exception. To further investigate the problem, could you please send us the whole project including the database.

    Greetings,
    Hrisi
    the telerik team

    Instantly find answers to your questions at the new telerik Support Center
  7. hibri
    hibri avatar
    12 posts
    Registered:
    06 Dec 2006
    11 Apr 2007
    Link to this post
    Hi Hrisi,
    Thanks for your quick reply. I haven't specified  the connection pool size as yet, the site is not under any significant load. Is there a recommnended connection pool size for SF ?

    For the other error please find the full stack trace and message below, it must have got cutoff earlier. Note that there is only one page with that name.
    I'll see if i can send you the project and database. Is there an email I can send it to, I do not want to post client data in a public forum.
    Stack trace below.
    -----
    ---------------
    Application domain: /LM/W3SVC/1976293450/ROOT/CTS-1-128207413882812500
    Trust level: Full
    Application Virtual Path: /CTS
    Application Path: XX
    Machine name: XX


    ** Events **
    ---------------
    Event code: 3005
    Event message: An unhandled exception has occurred.
    Event time: 4/11/2007 6:03:32 AM
    Event time (UTC): 4/11/2007 5:03:32 AM
    Event ID: 0ad876add53c48318ea35630af3bbcb0 Event sequence: 56 Event occurrence: 1 Event detail code: 0

    Process information:
    Process ID: 4204
    Process name: w3wp.exe
    Account name: NT AUTHORITY\NETWORK SERVICE

    Exception information:
    Exception type: System.InvalidOperationException
    Exception message: Multiple nodes with the same URL '/CTS/Home.aspx' were found. XmlSiteMapProvider requires that sitemap nodes have unique URLs.

    Request information:
    Request URL: http://www.example.com/CTS/cmsentrypoint.aspx
    Request path: /CTS/cmsentrypoint.aspx
    User host address: XXX
    User:
    Is authenticated: False
    Authentication Type:
    Thread account name: XX

    Thread information:
    Thread ID: 5
    Thread account name: XX
    Is impersonating: False
    Stack trace: at System.Web.StaticSiteMapProvider.AddNode(SiteMapNode node, SiteMapNode parentNode)
    at Telerik.Cms.Web.CmsSiteMapProvider.BuildSiteMap()
    at Telerik.Cms.Web.CmsSiteMapProvider.GetRootNodeCore()
    at System.Web.SiteMapProvider.get_RootNode()
    at System.Web.UI.WebControls.SiteMapDataSource.GetNodes()
    at System.Web.UI.WebControls.SiteMapDataSource.GetTreeView(String viewPath)
    at System.Web.UI.WebControls.SiteMapDataSource.GetHierarchicalView(String viewPath)
    at System.Web.UI.HierarchicalDataSourceControl.System.Web.UI.IHierarchicalDataSource.GetHierarchicalView(String viewPath)
    at System.Web.UI.WebControls.HierarchicalDataBoundControl.GetData(String viewPath)
    at System.Web.UI.WebControls.Menu.DataBindItem(MenuItem item)
    at System.Web.UI.WebControls.Menu.PerformDataBinding()
    at System.Web.UI.WebControls.HierarchicalDataBoundControl.PerformSelect()
    at System.Web.UI.WebControls.BaseDataBoundControl.DataBind()
    at System.Web.UI.WebControls.Menu.DataBind()
    at System.Web.UI.WebControls.BaseDataBoundControl.EnsureDataBound()
    at System.Web.UI.WebControls.Menu.EnsureDataBound()
    at System.Web.UI.WebControls.Menu.OnPreRender(EventArgs e, Boolean registerScript)
    at System.Web.UI.WebControls.Adapters.MenuAdapter.OnPreRender(EventArgs e)
    at System.Web.UI.Control.PreRenderRecursiveInternal()
    at System.Web.UI.Control.PreRenderRecursiveInternal()
    at System.Web.UI.Control.PreRenderRecursiveInternal()
    at System.Web.UI.Control.PreRenderRecursiveInternal()
    at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)

  8. Rebecca
    Rebecca avatar
    536 posts
    Registered:
    24 Sep 2012
    11 Apr 2007
    Link to this post
    Hi Hibri,

    Such problems with the connection pool have not been reported so far. Please open a new support thread (go to your cleint.net account and click New Support Ticket) and attach the archived project and the database. You can remove the RadControls folder to shorten the file by approx. 10MB.
    We will test your project locally and advise you further about connection pool settings.

    Thanks for your cooperation in advance.

    Regards,
    Rebecca
    the telerik team

    Instantly find answers to your questions at the new telerik Support Center
Register for webinar
8 posts, 0 answered