Copied to clipboard

Flag this post as spam?

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


  • Paul Merks 35 posts 100 karma points
    Nov 24, 2014 @ 16:40
    Paul Merks
    0

    Media Section Tree not loading (Server 500 error)

    Hello,

    We have an Umbraco implementation which contains a Media directory containing over 15.000+ items. Very active sportscommunity. But we are not able to open the Media section. It takes a long time and after that, i get a server 500 error on this URL: http://www.rhode.nl/umbraco/backoffice/UmbracoTrees/ApplicationTree/GetApplicationTrees?application=media&tree=&isDialog=false

    The response i get is partial JSON:

    )]}',
    {"Message":"An error has occurred."}

     

    While browsing the Media in the Content section, using the mediapicker, has no problems at all. 

    I've already changed the httpExecution maxRequestLength, but this did not fix my problem. Does anybody have a solution?

    Regards,

    Paul

  • Jan Skovgaard 11280 posts 23678 karma points MVP 10x admin c-trib
    Nov 24, 2014 @ 17:19
    Jan Skovgaard
    0

    Hi Paul

    Don't know if adding/optimizing the database indexes might help but I think it's worth a shot. Try reading this post http://our.umbraco.org/forum/developers/extending-umbraco/42361-This-is-a-bit-dirtybut-I-need-to-mess-with-the-database - Scroll to the bottom of page 1 and read what Mikkel is suggesting and then browse through the thread and read the rest of Mikkels answers.

    Don't know if the event viewer on the server can reveal some hints as well - might also be worth checking Umbraco's trace log at /app_data/logs to see if anything related is marked with ERROR or WARNING.

    Hope this helps!

    /Jan

  • Paul Merks 35 posts 100 karma points
    Nov 24, 2014 @ 17:32
    Paul Merks
    0

    Thanks, let me get into this. Hopefully this does the trick.

    I'll keep you posted!

  • Paul Merks 35 posts 100 karma points
    Nov 24, 2014 @ 20:36
    Paul Merks
    0

    I'm sure some processes will be a lot faster now, but my problem still remains. 

    I also checked the log file (app_data\logs\UmbracoTraceLog.txt). It contains some errors, but no backend or related errors.

    It is only the tree of the media section that is not loading. The content in the right pane (the media root folder and it's content) loades perfectly.

    Is it possible that some old media content (read: pre upgrade v4 to V7) contains some invalid property data? I've read somewhere is my search for a solution.

  • Paul Merks 35 posts 100 karma points
    Nov 24, 2014 @ 20:44
    Paul Merks
    0

    I missed some errors in the log. I found the one below. Does it ring any bells?

     

    2014-11-24 20:41:45,876 [7] INFO  Umbraco.Core.Persistence.UmbracoDatabase - [Thread 20]    at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction)

       at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction)

       at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj, Boolean callerHasConnectionLock, Boolean asyncClose)

       at System.Data.SqlClient.TdsParser.TryRun(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj, Boolean& dataReady)

       at System.Data.SqlClient.SqlDataReader.TryConsumeMetaData()

       at System.Data.SqlClient.SqlDataReader.get_MetaData()

       at System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString)

       at System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async, Int32 timeout, Task& task, Boolean asyncWrite, SqlDataReader ds)

       at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, TaskCompletionSource`1 completion, Int32 timeout, Task& task, Boolean asyncWrite)

       at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method)

       at System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior behavior, String method)

       at System.Data.SqlClient.SqlCommand.ExecuteDbDataReader(CommandBehavior behavior)

       at System.Data.Common.DbCommand.ExecuteReader(CommandBehavior behavior)

       at StackExchange.Profiling.Data.ProfiledDbCommand.ExecuteDbDataReader(CommandBehavior behavior)

       at System.Data.Common.DbCommand.System.Data.IDbCommand.ExecuteReader()

       at Umbraco.Core.Persistence.PetaPocoCommandExtensions.<>c__DisplayClass4.<ExecuteReaderWithRetry>b__3()

       at Umbraco.Core.Persistence.FaultHandling.RetryPolicy.ExecuteAction[TResult](Func`1 func)

       at Umbraco.Core.Persistence.PetaPocoCommandExtensions.ExecuteReaderWithRetry(IDbCommand command, RetryPolicy cmdRetryPolicy, RetryPolicy conRetryPolicy)

       at Umbraco.Core.Persistence.PetaPocoCommandExtensions.ExecuteReaderWithRetry(IDbCommand command, RetryPolicy retryPolicy)

       at Umbraco.Core.Persistence.PetaPocoCommandExtensions.ExecuteReaderWithRetry(IDbCommand command)

       at Umbraco.Core.Persistence.Database.<Query>d__1c`1.MoveNext()

  • Jan Skovgaard 11280 posts 23678 karma points MVP 10x admin c-trib
    Nov 24, 2014 @ 22:00
    Jan Skovgaard
    0

    Hi Paul

    Let me get this straight...your current Umbraco installation has been upgraded from 4.7 to 7? Or did you read that there could be some issues like this in 4.7?

    If you did upgrade from 4.7 to 7, Which path did you follow?

    /Jan

  • Jan Skovgaard 11280 posts 23678 karma points MVP 10x admin c-trib
    Nov 24, 2014 @ 22:01
    Jan Skovgaard
    100

    ...Oh and btw have you tried resetting the permissions for the umbraco folder and inheriting it all the way down? Sometimes it needs to be reset after upgrading I think.

    /Jan

  • Paul Merks 35 posts 100 karma points
    Nov 24, 2014 @ 22:18
    Paul Merks
    0

    Hi Jan,

    Thanks! I reset the permissions and now I see content in my Media Tree. It looks like this did the trick.
    I'm a little but worried that it's a temporary result, because my client said that it worked sometimes.

    But for now I'll mark it as an answer, thanks for your time!

    Regards,

    Paul 

      

     

  • Jan Skovgaard 11280 posts 23678 karma points MVP 10x admin c-trib
    Nov 24, 2014 @ 22:25
    Jan Skovgaard
    0

    Hi Paul

    Glad it worked out and crossing fingers that it will keep working.

    But might be worth checking the event viewer on the server as well next time and gather as much information as possible - but please do not hesitate to shout in here if the issue arises again.

    Cheers, Jan

  • Paul Merks 35 posts 100 karma points
    Nov 24, 2014 @ 22:53
    Paul Merks
    0

    I also opened the event viewer on the server, and there are no logs around the time i got the error. I guess Umbraco i catching those and write them to their own logfiles.

  • Paul Merks 35 posts 100 karma points
    Nov 25, 2014 @ 11:32
    Paul Merks
    0

    Today the error returned. My users still dont see the Media tree content showing up, and in Chrome there is an error in the console:

    http://www.rhode.nl/umbraco/backoffice/UmbracoTrees/ApplicationTree/GetApplicationTrees?application=media&tree=&isDialog=false

    )]}',
    {"Message":"An error has occurred."}

    And there is an error in my App_data/log/ file for today;

    2014-11-25 11:26:36,378 [8] INFO  Umbraco.Core.Persistence.UmbracoDatabase - [Thread 31]    at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction)
       at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj, Boolean callerHasConnectionLock, Boolean asyncClose)
       at System.Data.SqlClient.TdsParser.TryRun(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj, Boolean& dataReady)
       at System.Data.SqlClient.SqlDataReader.TryConsumeMetaData()
       at System.Data.SqlClient.SqlDataReader.get_MetaData()
       at System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString)
       at System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async, Int32 timeout, Task& task, Boolean asyncWrite, SqlDataReader ds)
       at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, TaskCompletionSource`1 completion, Int32 timeout, Task& task, Boolean asyncWrite)
       at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method)
       at System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior behavior, String method)
       at System.Data.SqlClient.SqlCommand.ExecuteDbDataReader(CommandBehavior behavior)
       at StackExchange.Profiling.Data.ProfiledDbCommand.ExecuteDbDataReader(CommandBehavior behavior)
       at System.Data.Common.DbCommand.System.Data.IDbCommand.ExecuteReader()
       at Umbraco.Core.Persistence.PetaPocoCommandExtensions.<>c__DisplayClass4.<ExecuteReaderWithRetry>b__3()
       at Umbraco.Core.Persistence.FaultHandling.RetryPolicy.ExecuteAction[TResult](Func`1 func)
       at Umbraco.Core.Persistence.Database.<Query>d__1c`1.MoveNext()

     

    So, the provided fixes above did not fix my issue. What else could be wrong? 

  • Jan Skovgaard 11280 posts 23678 karma points MVP 10x admin c-trib
    Nov 25, 2014 @ 11:34
    Jan Skovgaard
    0

    Hi Paul

    Did you try to add indexes in the database?

    Have you checked if the server has enough disk space?

    /Jan

  • Paul Merks 35 posts 100 karma points
    Nov 25, 2014 @ 11:39
    Paul Merks
    0

    There is more than 100GB free diskspace and the indexes, from the post you pointed to, are created. This did speedup things, but did not prevent this error. Yesterday is worked for a while, now it doesn't anymore.

    I just tried if recycling the application pool does any good, but it doesn't make any difference. But what is the error in my errorlog? This isn't very detailed. It does not tell me very much...

  • Jan Skovgaard 11280 posts 23678 karma points MVP 10x admin c-trib
    Nov 25, 2014 @ 11:55
    Jan Skovgaard
    0

    Hi Paul

    I'm not sure about the error in the log...I can't wrap my ahead around where things might go wrong.

    Would it be possible to try and switch to another server? If so it might be worth trying out.

    Was this solution original running Umbraco 4.7 and was then upgraded to 7?

    Do you use any 3rd party packages to deal with media items, which might be the cause? Any custom API integrations?

    /Jan

  • Jasmin 5 posts 52 karma points
    Nov 25, 2014 @ 12:14
    Jasmin
    0

    Hi, I believe I have a similar error but totally lost as fine on the CMS side but not clued up on coding/development. We have an inspirations section within our site (basically the blog) but it has 3 main sections - editorial about themes, editorial about locations and then blog articles. I noticed about 70% of the themes were linking to an error 500 page in the live site but couldn't see a reason for this. I reset all the themes up and called them test e.g. Wildlife test and then copied and pasted the content from the original exactly like for like. I then unpublished the original versions and set them into an unpublished folder. These all worked fine on the live site but then I noticed the blog articles were all going to 500 error pages and must have been as a result of me resetting the above. I can't see any error at all and am totally confused about what my next step should be. I believe it's because the articles are tagged to make them appear under relevant theme searches e.g. wildlife, culture etc but these are in and are like for like so no idea why not showing. For info, an example of an affected link is http://www.jod.uk.com/500?aspxerrorpath=/inspiration/articles/january-14/10-unmissable-brazilian-experiences/ and the main inspirations section can be found here http://www.jod.uk.com/inspiration - Hoping someone can help!!!! Thanks :)

  • Jan Skovgaard 11280 posts 23678 karma points MVP 10x admin c-trib
    Nov 25, 2014 @ 12:22
    Jan Skovgaard
    0

    Hi Jasmin and welcome to our :)

    I'm not sure these two errors are related - Would you mind creating a specific topic for your issue? Just so we don't get things mixed up in regards to the things you should try in order to see what might be the issue in your scenario.

    Cheers, Jan

  • Jasmin 5 posts 52 karma points
    Nov 25, 2014 @ 12:32
    Jasmin
    0

    Of course - thanks Jan!

     

  • Paul Merks 35 posts 100 karma points
    Nov 25, 2014 @ 13:01
    Paul Merks
    0

    Ps. The database size of this umbraco installation is about 16 GB.

  • Paul Merks 35 posts 100 karma points
    Nov 25, 2014 @ 18:25
    Paul Merks
    0

    I'm pretty sure the problem is a time out on the SQL server. The query for the tree is much different than the query for the contents of the root Media folder. 

    So I've been comparing the database structure with the latest version. I noticed some differences, especially in the names of fk references. I then searched for ways of cleaning the versioning information, combined with indexes that the following script below advices. Cleaning all the data changed my database size from 16 GB to 7 GB. Now my Media section is working, but I guess it will return once the database is grown again.

    The problem remains in the Media tree, but hopefully this workaround will keep Umbraco running. Using Media in the Content section using the Media picker works like a charm.

     

  • Jan Skovgaard 11280 posts 23678 karma points MVP 10x admin c-trib
    Nov 25, 2014 @ 21:31
    Jan Skovgaard
    0

    Hi Paul

    Sorry for the late reply but sounds good that it's working now that you have cleaned the DB.

    Don't know if it's an option for you to do a cleaning job removing versions from the different pages? Each time there is a change a new version is saved. Perhaps it's enough if only the 5 latest versions are possible to roll back to for instance.

    I can't remember if there still is a logtable but if there is it might be a good idea to clean it up as well.

    /Jan

  • Paul Merks 35 posts 100 karma points
    Nov 25, 2014 @ 23:18
    Paul Merks
    0

    The log table has also been cleaned. 

     

    But, you have to admit, this shouldn't affect this Media tree request?

  • Jan Skovgaard 11280 posts 23678 karma points MVP 10x admin c-trib
    Nov 26, 2014 @ 06:18
    Jan Skovgaard
    0

    Hi Paul

    Probably not - Just a thought. I don't know the inner workings of the DB that well :)

    /Jan

  • Paul Merks 35 posts 100 karma points
    Nov 26, 2014 @ 08:47
    Paul Merks
    0

    Anyway, thanks for your time!

Please Sign in or register to post replies

Write your reply to:

Draft