Copied to clipboard

Flag this post as spam?

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


  • Erik 18 posts 39 karma points
    Aug 28, 2012 @ 23:09
    Erik
    0

    Examine/Lucene errors when two nodes published at same time.

    I have a client that has a rather large site (umbraco.config around 37mb). There are a few indexes setup on the site, and every once and a while the site search stops working. Generally the error we get is the following:

    [UmbracoExamine] (NAME_OF_INDEX)Cannot create index, the index is currently locked,, IndexSet: NAME_OF_INDEX

    The usual fix is to delete the index files and cycle the app pool. The only way that we have been able to reproduce this issue is by publishing two nodes at the same time. We get mixed results while doing this so I guess it is a timing issue, but with a few tries we can get it in a state where it will not recover without manual intervation. While doing this we get a number of other erors like, "Error indexing queue items, Object reference not set to an instance of an object." and "Failed to add document with id X to Lucene search index" and "System.IO.FileNotFoundException: Could not find file 'X'." where X is the name of an index cfs file.

    When the index gets in this locked up state there is the write.lock file sitting in the index folder and it doesn't leave.

    So, any ideas how we can stop this from happening? Manually fixing the search every week isn't a practical option. One option is to set enableDefaultEventHandler to false and reindex via a scheduled task but I would rather find a way to make things work when a document is published.

    The site is running on a windows VPS in full trust. Here is the config for the search:

    <add name="MYINDEX"
    type="UmbracoExamine.UmbracoContentIndexer, UmbracoExamine"
    runAsync="true"
    supportUnpublished="false"
    supportProtected="true"
    interval="10"
    analyzer="Lucene.Net.Analysis.Standard.StandardAnalyzer, Lucene.Net"
    indexSet=" MYINDEX "
    enableDefaultEventHandler="true"
    logLevel="verbose"/>

  • Erik 18 posts 39 karma points
    Aug 29, 2012 @ 15:35
    Erik
    0

    I am on Umbraco 4.7.1 btw.

  • Erik 18 posts 39 karma points
    Aug 29, 2012 @ 17:34
    Erik
    0

    Found some legacy code in the system that had an action handler listening on document publishing and was working directly with Lucene to add the node to the index. As soon as I removed that action handler things started working fine with examine.

  • Justin Grimm 56 posts 138 karma points
    Jun 17, 2013 @ 21:52
    Justin Grimm
    0

    Hi Erik,

    Any idea what the handler you removed was?

     

Please Sign in or register to post replies

Write your reply to:

Draft