Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Allen Racho 4 posts 25 karma points
    Oct 31, 2012 @ 03:34
    Allen Racho
    0

    Very large number of logged exceptions: 'GetRootDocuments: System.TypeInitializationException:'

    Hello all!

    We have a website based on Umbraco 4.7.2 that has been running flawlessly since late June 2012.

    Recently however, we have started to see an alarming number of exceptions in the umbracoLog table of this type:

    GetRootDocuments: System.TypeInitializationException: The type initializer for 'umbraco.BusinessLogic.UserType' threw an exception. ---> umbraco.DataLayer.SqlHelperException: Umbraco Exception (DataLayer): SQL helper exception in ExecuteReader ---> System.Data.SqlClient.SqlException: A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server) at System.Data.ProviderBase.DbConnectionPool.GetConnection(DbConnection owningObject) at System.Data.ProviderBase.DbConnectionFactory.GetConnection(DbConnection owningConnection) at System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory)
    at System.Data.SqlClient.SqlConnection.Open()
    at Microsoft.ApplicationBlocks.Data.SqlHelper.ExecuteReader(String connectionString, CommandType commandType, String commandText, SqlParameter[] commandParameters)     at umbraco.DataLayer.SqlHelpers.SqlServer.SqlServerHelper.ExecuteReader(String commandText, SqlParameter[] parameters)
    at umbraco.DataLayer.SqlHelper`1.ExecuteReader(String commandText, IParameter[] parameters)     

    --- End of inner exception stack trace ---
    at umbraco.DataLayer.SqlHelper`1.ExecuteReader(String commandText, IParameter[] parameters)
    at umbraco.BusinessLogic.UserType.Cache()
    at umbraco.BusinessLogic.UserType..cctor()

    --- End of inner exception stack trace ---
    at umbraco.BusinessLogic.UserType.GetUserType(Int32 id)
    at umbraco.BusinessLogic.User.setupUser(Int32 ID)
    at umbraco.BusinessLogic.User..ctor(Int32 ID)
    at umbraco.BusinessLogic.User.GetUser(Int32 id)
    at umbraco.cms.businesslogic.web.Document.setupNode()
    at umbraco.cms.businesslogic.CMSNode..ctor(Guid uniqueID)
    at umbraco.cms.businesslogic.web.Document.GetRootDocuments()

    There are somewhere in the neighborhood of >11,000 logged exceptions of this type over the past 3-4 weeks, the vast majority concentrated over three days: about 9,500 or so over two of the days, 1000 or so over one day, and the rest spread out over the remainder.

    The website has been running well in a load-balanced configuration, with a common file share between them for admin-editable assets (css, masterpages, xslt).

    We've noticed that during the three affected days, one of the servers exhibits the following:

    • users are suddenly completely unable to log in to the admin
    • a "dynamic sitemap" (Cultiv Sitemap) suddenly throws a 404 on the same server which was not accepting logins

    General user-facing web content continues to be displayed (served) in an uninterrupted manner from both servers.

    Then, without any specific intervention from IT resources, the problem suddenly seems to correct itself (overnight?) and operations return completely to normal.

    Any insight on what this mystifying issue could be?

    Thank you in advance!

    Allen

  • Dirk De Grave 4541 posts 6021 karma points MVP 3x admin c-trib
    Oct 31, 2012 @ 09:29
    Dirk De Grave
    0

    " error: 40 - Could not open a connection to SQL Server"

    Sounds like a problem connecting to your sql box? your website is still up and running because it serves the content from xml cache, and has no need connecting to your sql box, whereas admins woon't be able to connect to the backend because of this error.

    I guess you need to talk to the it infra guys to find out why your sql box could not be found

    Cheers,

    /Dirk

  • Allen Racho 4 posts 25 karma points
    Oct 31, 2012 @ 13:12
    Allen Racho
    0

    Dirk,

    Thanks much for the reply, I appreciate it.

    Yes, because of the clear exception, we threw this right away in IT's court - and they say there's nothing unusual on either the SQL box or the front-ends (i.e. no excessive usage or evidence of other errors on the servers themselves) for the time period in question.

    Before I formally light a fire :) I guess I'd like to get a bit of information on:

    • what the operation "GetRootDocuments" is
    • perhaps some thoughts on why the exception occurred so many times
    • and is there any configuration that could be made more optimal, just in case Umbraco is somehow more "sensitive" to the quality of SQL connectivity (for example, more diligent about assessing and logging the state of availability of the database)

    (I assume also that the connectivity drop-outs must have been very short-lived and that we eventually get these logged in the DB due to some batching capabilities on the part of the logger.)

    If there's nothing else to explore from a configuration or code standpoint - and the error is what it indicates, no more and no less - then we will take a stand and press the case for flawed connectivity. At this point, IT's main argument is the aforementioned lack of "evidence" on the servers and the fact that "other apps were not affected" in the same time frame.

    However, I do know that most or all of the other apps on the farm in question are explicitly not as diligent about logging inability to reach the database, nor about batching logging attempts...

    Thanks again,

    Allen

Please Sign in or register to post replies

Write your reply to:

Draft