Copied to clipboard

Flag this post as spam?

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


  • Andy Finn 14 posts 105 karma points
    Aug 01, 2019 @ 09:49
    Andy Finn
    0

    Examine Indexer

    Getting the error Error the indexer is locked : cannot index queue items, the index is currently locked site:our.umbraco.com . So search just crashes if been used. I have restarted the App in Azure / how do you Force Unlock it ? I tried also from UI , it just crashes out and cant get to any of the settings ? Umbraco 8.0.2 version I see lots of comments on forum for umbraco 7 , update settings but i dont think in the code there is any settings i can change to force the unlock ?

    thanks in advance Andy

  • Nik 1155 posts 4763 karma points MVP 2x c-trib
    Aug 01, 2019 @ 10:46
    Nik
    0

    Hi Andy,

    Have you configured Examine for working in an Azure Web App ?

    There are various AppSettings that you need to add so it works correctly with how Azure works.

    Thanks

    Nik

  • Andy Finn 14 posts 105 karma points
    Aug 01, 2019 @ 10:54
    Andy Finn
    0

    thanks Nik, https://our.umbraco.com/documentation/Getting-Started/Setup/Server-Setup/azure-web-apps#examine-v0180 , i followed this But in Umbraco 8 there is no examine.config settings ( not that i can find) , strange this is the we have dev site and search is fine ( also in Azure) but the production has the index lock .

    also followed this : https://our.umbraco.com/forum/using-umbraco-and-getting-started/90867-examine-lock-error-brings-down-azure-site But this seems more directed for umbraco7 than 8

    Thanks Andy

  • Andy Finn 14 posts 105 karma points
    Aug 01, 2019 @ 19:23
    Andy Finn
    100

    Issue now resolved add some code to check if the directory is locked and unlock it .. thanks for the help

  • Nik 1155 posts 4763 karma points MVP 2x c-trib
    Aug 01, 2019 @ 20:21
    Nik
    0

    Hey Andy,

    Pleased to hear you sorted it. For reference the v8 version of the umbraco settings can be found here https://github.com/umbraco/Umbraco-CMS/issues/5035#issuecomment-476477802

    They are now app settings so live in Web.config.

    It's worth reading that entire issue though just as odd things can happen.

    Nik

  • Zac 232 posts 511 karma points
    Sep 18, 2019 @ 17:55
    Zac
    0

    Hi Andy,

    We're running into the same issue. Would you mind sharing your code / approach to fix the issue? We'd greatly appreciate it.

    Thanks

  • Andy Finn 14 posts 105 karma points
    Sep 19, 2019 @ 11:43
    Andy Finn
    1

    @Zac if you update the code to this to the ExamineComponent.cs (which is in application/initialization folder)

    DirectoryFactory.DefaultLockFactory = d =>
            {
                var simpleFsLockFactory = new NoPrefixSimpleFsLockFactory(d);
                return simpleFsLockFactory;
            };
            foreach (var index in _indexCreator.Create()) { 
                if (index is LuceneIndex)
                {
                    var luceneIndex = index as LuceneIndex;
                    var dir = luceneIndex.GetLuceneDirectory();
                    if (IndexWriter.IsLocked(dir))
                    {
                        IndexWriter.Unlock(dir);
                    }
                }
            _examineManager.AddIndex(index);
            }
    
  • Zac 232 posts 511 karma points
    Sep 19, 2019 @ 14:58
    Zac
    0

    Thanks, Andy!

Please Sign in or register to post replies

Write your reply to:

Draft