Copied to clipboard

Flag this post as spam?

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


  • Murray Roke 502 posts 965 karma points c-trib
    Apr 19, 2010 @ 00:54
    Murray Roke
    0

    Timeout.

    Hiya,

    I have a runaway log file it's grown too big 700MB, my plan was to use the client tools for umbraco...

    But when I try and use the client tools It keeps timing out.

    the Exception is a SQL timeout at my server, on my localhost with old data it works and only shows the top 100 records.

    The number of log entries (even at 700MB) should not have that kind of effect, unless the query is doing something excessive or the table is not indexd on the correct field or something?

    Any ideas? Is this a common problem for bloated logs?

    Cheers.

    Murray.

     

  • Thomas Höhler 1237 posts 1709 karma points MVP
    Apr 19, 2010 @ 11:38
    Thomas Höhler
    0

    You are right: this shouldn't affect the query unless you are not filtering the results. So in the normal startup of the Client Tools LogViewer the query is this: "SELECT TOP (100) id, userId, NodeId, Datestamp, logHeader, logComment FROM umbracoLog  ORDER BY DateStamp DESC"

    Which DB and which Umbraco version are you using?

    Try to extend the db timeout via the connection string of umbraco in the web.config.

     

  • Thomas Höhler 1237 posts 1709 karma points MVP
    Apr 19, 2010 @ 11:39
    Thomas Höhler
    0

    Cause the standard query is using a sort you can add an index to the table for the Datestamp field.

    hth, Thomas

  • Murray Roke 502 posts 965 karma points c-trib
    Apr 20, 2010 @ 04:54
    Murray Roke
    0

    Yep definately sorting.

    I did these 2 queries, and the top <1s, the bottom one took 5 minutes.

    select top 500 * from umbracoLog

    select top 500 * from umbracoLog order by datestamp desc

    After adding the index both queries were <1s

    also it looks like the delete by date has the same problem, even after adding an index.

    I think this article explains why???

    http://stackoverflow.com/questions/95183/how-does-one-create-an-index-on-the-date-part-of-datetime-field-in-mysql

     

    Cheers.

    Murray.

     

Please Sign in or register to post replies

Write your reply to:

Draft