4

Our Search.Log files are becoming huge (50-100 MB daily). In it I can see a large amount of queries regarding Contacts and Contactlists to analytics index that run 24/7.

Query - (type_t:(contact) AND (contact.tags_sm:(ContactLists\:\{088822A7\-FCA4\-4588\-932D\-048BE98FA115\}) OR (contact.tags_sm:(\{088822A7\-FCA4\-4588\-932D\-048BE98FA115\}) AND contact.tags_sm:(ContactLists~0.5))))

The queries run even if there is no editing happening so my guess is that its some process run by the EXM.

EDIT: This issue is with List Manager, and not EXM specifically.

I would love to find out which process it is and find out if its really necessary for it to use all these resources or if its an error in configuration by me

Solution is 8.2 initial release and EXM 3.4

Anybody know?

5
  • 1
    EXM uses list from the list manager to send our the emails. And those queries are just like the queries here. blog.agilereaction.io/using-the-list-manager-is-sitecore-8-2.
    – Chris Auer
    Commented May 15, 2017 at 14:53
  • @ChristianRaaschou How is the environment setup (e.g. single/scaled), and if scaled, which server(s) is the search log behaving like this? Are all the queries similar to that, and is it only those two lists being queried? What type of lists are they (normal/segmented)? EXM queries List Manager lists during message creating and dispatch, and when changing subscriptions. Commented May 16, 2017 at 23:40
  • @JacobNielsen The enviroment is scaled CM/CD/Processing. CM and Processing have this behaviour. There are some other "normal" queries aswell that I recognize but 99% is that query. It also looks like it runs the same query (same parameters) every 10th second. The list are normal contact lists, imported from CSV files. It looks the same on test enviroment even when there is no emails created or dispatched. Every 10 seconds it sends a query. Commented May 18, 2017 at 11:08
  • @ChristianRaaschou Got it thanks. It's not EXM then, but I think Sergey's answer explains why. Commented May 18, 2017 at 14:32
  • 1
    To prevent confusion, when searching Stack Exchange, I have edited the question to reflect the issue with List Manager specifically, and not EXM directly. Commented May 22, 2017 at 19:58

2 Answers 2

5

First of all, you should disable List Manager on the processing server.

The search messages in logs are likely caused by the Sitecore.ListManagement.Analytics.UnlockContactListsAgent class. It looks for locked contact lists every 10 seconds (configured in the Sitecore.ListManagement.config file) and tries to unlock them as soon as the real (indexed) contacts count reaches the expected one (stored in the list item).

The list locking is an important mechanism preventing a half-built lists from being used for dispatching or creating another lists. You can unlock a list manually using the Contact List task page on UI.

1
  • Great! That was the problem. A number of lists were stuck in locked and as soon as I unlocked them the problem went away. Also disabled list manager on processing. Commented May 22, 2017 at 12:01
2

Sitecore uses log4net as its logging component. You can change the logging levels for different parts of the Sitecore install.

This is the default log settings found in the Sitecore.ContentSearch.config file:

<log4net>
  <appender name="SearchLogFileAppender" type="log4net.Appender.SitecoreLogFileAppender, Sitecore.Logging">
    <file value="$(dataFolder)/logs/Search.log.{date}.txt"/>
    <appendToFile value="true"/>
    <layout type="log4net.Layout.PatternLayout">
      <conversionPattern value="%4t %d{ABSOLUTE} %-5p %m%n"/>
    </layout>
    <encoding value="utf-8"/>
  </appender>
  <appender name="CrawlingLogFileAppender" type="log4net.Appender.SitecoreLogFileAppender, Sitecore.Logging">
    <file value="$(dataFolder)/logs/Crawling.log.{date}.txt"/>
    <appendToFile value="true"/>
    <layout type="log4net.Layout.PatternLayout">
      <conversionPattern value="%4t %d{ABSOLUTE} %-5p %m%n"/>
    </layout>
    <encoding value="utf-8"/>
  </appender>
  <logger name="Sitecore.Diagnostics.Search" additivity="false">
    <level value="INFO"/>
    <appender-ref ref="SearchLogFileAppender"/>
  </logger>
  <logger name="Sitecore.Diagnostics.Crawling" additivity="false">
    <level value="INFO"/>
    <appender-ref ref="CrawlingLogFileAppender"/>
  </logger>
</log4net>

It looks like your logging level for Sitecore.Diagnostics.Search is set too high. You can change this to WARN' orERRORor evenOFF` to reduce the number of entries.

Always make sure this is done via a patch file. For example, this would set the level to WARN:

<?xml version="1.0" encoding="utf-8" ?>
<configuration xmlns:patch="http://www.sitecore.net/xmlconfig/">
    <sitecore>
        <log4net>
            <logger name="Sitecore.Diagnostics.Search" additivity="false">
                <level>
                    <patch:attribute name="value">WARN</patch:attribute>
                </level>
            </logger>
      </log4net>
    </sitecore>
</configuration>
1
  • Thanks for the answer, but I am curios to what actually casues all these searches. Simply changing the logging would of course hide it from me, but why are there so many searches against analytics regarding contact list when there is no actual work going on? We have the behaviour on our test enviroment with no visitors and no real editing happening. Commented May 15, 2017 at 13:59

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.