DNN Forums

Ask questions about your website to get help learning DNN and help resolve issues.

DNN 9.2.1 in Azure WebApp: Unable to create Lucene writer (lock file is in use)

 25 Replies
 8 Subscribed to this topic
 40 Subscribed to this forum
Sort:
Page 1 of 3123 > >>
Author
Messages
New Around Here
Posts: 5
New Around Here

Helllo.

I'm running DNN 9.2.1 in an Azure WebApp setup with 2 instances. I've recently started using the DNN search to index my websites content and my logs have exploded with errors (show at the bottom). On my usual configuration, with VMs I can set the crawler task to run on one server only. However, using WebApps that's not possible because the server name dynamic and can change whenever. 

Anyone has any tips to avoid having gigantic logs (50MB+) filled with errors related to this? Do I have to resort to indexing like once per day?

Thanks!

 


 

ERROR:

DotNetNuke.Services.Exceptions.SearchException: Unable to create Lucene writer (lock file is in use). Please recycle AppPool in IIS to release lock. ---> System.IO.IOException: The process cannot access the file 'D:\home\site\wwwroot\App_Data\Search\write.lock' because it is being used by another process.

   at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)

   at System.IO.File.InternalDelete(String path, Boolean checkHost)

   at System.IO.File.Delete(String path)

   at DotNetNuke.Services.Search.Internals.LuceneControllerImpl.get_Writer()

   --- End of inner exception stack trace ---

   at DotNetNuke.Services.Search.Internals.LuceneControllerImpl.get_Writer()

   at DotNetNuke.Services.Search.Internals.LuceneControllerImpl.Delete(Query query)

   at DotNetNuke.Services.Search.Internals.InternalSearchControllerImpl.DeleteSearchDocumentInternal(SearchDocument searchDocument, Boolean autoCommit)

   at DotNetNuke.Services.Search.Internals.InternalSearchControllerImpl.AddSearchDocumentInternal(SearchDocument searchDocument, Boolean autoCommit)

   at DotNetNuke.Services.Search.Internals.InternalSearchControllerImpl.AddSearchDocuments(IEnumerable`1 searchDocuments)

Veteran Member
Posts: 838
Veteran Member
3 Helpful Replier
Helpful Replier
Thanks for being such a helpful replier!
New Poster
New Poster
Congrats on posting!
Hi jssantos,

Shameless copy of Sebastian's answer sometime ago:
"please make sure, you don't have multiple IIS websites pointing to the same folder nor multiple worker threads. Did you check file permission for the folder?"
New Around Here
Posts: 5
New Around Here
Hello Tycho.

Well, since this is an Azure WebApp configuration I'm not sure if that's possible. I have one FTP, which will hold the website files used by a WebApp with multiple instances (starting at 2, but scaling horizontally).

The issue here is, since this is an all virtual environment I am not able to control the server names and thus i'm not able to limit the scheduled task to run on one server only. Since the task runs per instance it'll generate those errors and fill up my log file (closing in on 100MB log files, running once per day).
Senior Member
Posts: 1607
Senior Member
MVP
MVP
You're an MVP!
New Poster
New Poster
Congrats on posting!
This is a really good question... I'm not the best resource when it comes to Azure, so I'm pinging some folks to see if we can get someone to respond that's run into this before. :)
Growing Member
Posts: 55
Growing Member
MVP
MVP
You're an MVP!
Might help to turn down the logging to only keep 5 or 10 records in the event log?
New Around Here
Posts: 1
New Around Here
Are you currently using OpenContent? I did find this post that is discussing a similar issue:

https://opencontent.readm...16b5591a1300032bbb89

It looks like one of the solutions was to, "disable the search indexing on the affected template" or to "disable Lucene index in manifest"
Growing Member
Posts: 52
Growing Member
Haha, it was me who ran into the OpenContent issue :) We were using Evoq Engage 9.2.x (slightly different to DNN Platform - Evoq explicitly supports a multi-instance Azure setup). I was never able to find a good solution to this problem. In the end we scaled back down to a single instance, and made it more powerful.
New Around Here
Posts: 5
New Around Here
@Will Strohl thanks!

@Chris Hammond won't that only affect the DB logging and not the log file?

@Matt Rutledge @Olly Hodgson I need the indexing to run so disabling it is not really an option. It's disappointing to see that apparently there's no real solution to this. Scaling down is not something we want to do (because we are using dynamic scaling). Let's see if anyone has any more ideas to fix this.

I'm using a custom implementation of the ModuleSearchBase for my modules. What I may end up doing is creating a way that only one instance can fetch results to index, but this isn't ideal. I would rather this behavior be handled by DNN itself rather than working around the task scheduler.
Growing Member
Posts: 55
Growing Member
MVP
MVP
You're an MVP!
@jssantos yes, if you're seeing log file growth as well that would need to be handled differently
Veteran Member
Posts: 838
Veteran Member
3 Helpful Replier
Helpful Replier
Thanks for being such a helpful replier!
New Poster
New Poster
Congrats on posting!
Just to think of a very different solution: Have you considered DNN Sharp's Search Boost? Imo, this offers a lot more and there is also the backing knowledge of the company...
Page 1 of 3123 > >>

These Forums are for the discussion of the open source CMS DNN platform and ecosystem.

For the benefit of the community and to protect the integrity of the ecosystem, please observe the following posting guidelines:

  1. If you have (suspected) security issues, please DO NOT post them in the forums but instead follow the official DNN security policy
  2. No Advertising. This includes the promotion of commercial and non-commercial products or services which are not directly related to DNN.
  3. No vendor trolling / poaching. If someone posts about a vendor issue, allow the vendor or other customers to respond. Any post that looks like trolling / poaching will be removed.
  4. Discussion or promotion of DNN Platform product releases under a different brand name are strictly prohibited.
  5. No Flaming or Trolling.
  6. No Profanity, Racism, or Prejudice.
  7. Site Moderators have the final word on approving / removing a thread or post or comment.
  8. English language posting only, please.

Would you like to help us?

Awesome! Simply post in the forums using the link below and we'll get you started.

Get Involved