1

We are encountering lot of "General Exception" errors related to DNN search and 2sxc, sometimes the site even stops loading.

I'm attaching one of the errors from the admin log, but there are plenty can anyone help?

We're using Evoq 8.5, 2sxc 8.5.4.

<log LogGUID="e8a0d5ca-12f6-4865-a184-f440611ad3d5" LogFileID="" LogTypeKey="GENERAL_EXCEPTION" LogUserID="-1" LogEventID="212842" LogUserName="" LogPortalID="-1" LogPortalName="" LogCreateDate="3/5/2017 2:02:57 AM" LogCreateDateNum="0" BypassBuffering="False" LogServerName="RD0003FF6E964E" LogConfigID="4">
    <LogProperties>
      <LogProperty>
        <PropertyName>AbsoluteURL</PropertyName>
        <PropertyValue />
      </LogProperty>
      <LogProperty>
        <PropertyName>DefaultDataProvider</PropertyName>
        <PropertyValue>DotNetNuke.Data.SqlDataProvider, DotNetNuke</PropertyValue>
      </LogProperty>
      <LogProperty>
        <PropertyName>ExceptionGUID</PropertyName>
        <PropertyValue>d5db1b63-65bb-424e-9284-d6bdeb597078</PropertyValue>
      </LogProperty>
    </LogProperties>
    <Exception>
      <AssemblyVersion />
      <PortalId>-1</PortalId>
      <UserId>-1</UserId>
      <TabId>-1</TabId>
      <RawUrl />
      <Referrer />
      <UserAgent />
      <ExceptionHash>h7DfzrR5N2NZPGujVU3A9A==</ExceptionHash>
      <Message>Search: Error while indexing module 3429 on tab 1311, portal 14</Message>
      <StackTrace>   at ToSic.SexyContent.Environment.Dnn7.DnnBusinessController.GetModifiedSearchDocuments(ModuleInfo moduleInfo, DateTime beginDate) in C:\Projects\2SexyContent\Web\DesktopModules\ToSIC_SexyContent\Environment\Dnn7\DnnBusinessController.cs:line 32
   at DotNetNuke.Services.Search.ModuleIndexer.IndexSearchDocuments(Int32 portalId, ScheduleHistoryItem schedule, DateTime startDateLocal, Action`1 indexer)</StackTrace>
      <InnerMessage>The underlying provider failed on Open.</InnerMessage>
      <InnerStackTrace>   at System.Data.EntityClient.EntityConnection.OpenStoreConnectionIf(Boolean openCondition, DbConnection storeConnectionToOpen, DbConnection originalConnection, String exceptionCode, String attemptedOperation, Boolean&amp; closeStoreConnectionOnFailure)
   at System.Data.EntityClient.EntityConnection.Open()
   at System.Data.Objects.ObjectContext.EnsureConnection()
   at System.Data.Objects.ObjectQuery`1.GetResults(Nullable`1 forMergeOption)
   at System.Data.Objects.ObjectQuery`1.System.Collections.Generic.IEnumerable&lt;T&gt;.GetEnumerator()
   at System.Linq.Enumerable.FirstOrDefault[TSource](IEnumerable`1 source)
   at ToSic.Eav.BLL.EavDataController.InitZoneApp(Nullable`1 zoneId, Nullable`1 appId) in C:\Projects\eav-server\ToSic.Eav\BLL\EavDataController.cs:line 145
   at ToSic.SexyContent.Internal.AppManagement.EnsureAppIsConfigured(Int32 zoneId, Int32 appId, String appName) in C:\Projects\2SexyContent\Web\DesktopModules\ToSIC_SexyContent\SexyContent\Internal\AppManagement.cs:line 106
   at ToSic.SexyContent.App.InitializeResourcesSettingsAndMetadata(Boolean allowSideEffects) in C:\Projects\2SexyContent\Web\DesktopModules\ToSIC_SexyContent\SexyContent\App.cs:line 110
   at ToSic.SexyContent.App..ctor(Int32 zoneId, Int32 appId, PortalSettings ownerPortalSettings, Boolean allowSideEffects) in C:\Projects\2SexyContent\Web\DesktopModules\ToSIC_SexyContent\SexyContent\App.cs:line 103
   at ToSic.SexyContent.ContentBlock.ModuleContentBlock..ctor(ModuleInfo moduleInfo, IEnumerable`1 overrideParams) in C:\Projects\2SexyContent\Web\DesktopModules\ToSIC_SexyContent\SexyContent\ContentBlock\ModuleContentBlock.cs:line 55
   at ToSic.SexyContent.Search.SearchController.GetModifiedSearchDocuments(ModuleInfo moduleInfo, DateTime beginDate) in C:\Projects\2SexyContent\Web\DesktopModules\ToSIC_SexyContent\SexyContent\Search\SearchController.cs:line 48
   at ToSic.SexyContent.Environment.Dnn7.DnnBusinessController.GetModifiedSearchDocuments(ModuleInfo moduleInfo, DateTime beginDate) in C:\Projects\2SexyContent\Web\DesktopModules\ToSIC_SexyContent\Environment\Dnn7\DnnBusinessController.cs:line 28</InnerStackTrace>
      <Source>ToSic.SexyContent</Source>
      <FileName />
      <FileLineNumber>0</FileLineNumber>
      <FileColumnNumber>0</FileColumnNumber>
      <Method />
    </Exception>
  </log>
user366123
  • 153
  • 10

2 Answers2

1

This sounds like a DB error which probably has nothing to do with 2sxc. I recommend to do some DB maintenance and see if it solves everything.

So it's no known issue ATM

iJungleBoy
  • 5,325
  • 1
  • 9
  • 21
  • I have been experiencing this same issue of late except with DNNSharp's SearchBoost Search module indexing 2sxc modules on my site. I have tried the following maintenance SQL script https://gallery.technet.microsoft.com/scriptcenter/Script-for-rebuilding-all-8d079754#content but still happening? I have also ran several of these SQL health checks (https://github.com/BrentOzarULTD/SQL-Server-First-Responder-Kit#how-to-get-support) but it appears to be SearchBoost indexing 2sxc? – denisjoconnor Nov 09 '17 at 09:45
  • Daniel, Looking at the stacktrace I see this error seems to happen in 2sc code. Bear in mind that this code runs on different threads started by the DNN scheduler, where also there's no HTTP Context so this might be a potential cause. Other cause can be iterating over IEnumerable that change on other threads. – Bogdan Litescu Nov 09 '17 at 10:51
  • By the way, I would be curious to know if the other exceptions look exactly the same or are variations and also how often they occur., – Bogdan Litescu Nov 09 '17 at 10:52
  • I'm seeing this exception too, on 9.6.1. It sure would be nice to know why. – Will Strohl Nov 09 '17 at 23:22
  • Note: in 2sxc 9.6 we introduced page publishing, and we discovered that we accidentally had 2 places which expect the page/module context, which caused some issues. These were not index-related when we fixed them, but it may have had a side-effect on the index, we don't know. One was fixed in 9.7, the other will be fixed in 9.8. It's not sure if it fixes anything reported here, but it's worth a try. – iJungleBoy Nov 10 '17 at 12:02
1

Denis updated 2sxc and I've investigated the log files and found this error that might help narrow it down:

2017-11-14 12:35:46,608 [H10][Thread:76][ERROR] DotNetNuke.Services.Exceptions.Exceptions - System.Exception: [Indexing: Behavior SiteSearch (#1)] Error reading content source DNN Modules Indexer ---> ToSic.SexyContent.Search.SearchIndexException: Search: Error while indexing module 5242 on tab 1901, portal 0 ---> System.Collections.Generic.KeyNotFoundException: The given key was not present in the dictionary. at System.ThrowHelper.ThrowKeyNotFoundException() at System.Collections.Generic.Dictionary2.get_Item(TKey key) at ASP._Page_Portals_0_2sxc_Documents__Environment_Filter_App_cshtml.CustomizeData() in \Portals\0\2sxc\Documents\_Environment Filter App.cshtml:line 11 at ToSic.SexyContent.Engines.RazorEngine.CustomizeData() in C:\Projects\2SexyContent\Web\DesktopModules\ToSIC_SexyContent\2Sexy Content Razor\RazorEngine.cs:line 109 at ToSic.SexyContent.Engines.EngineBase.Init(Template template, App app, ModuleInfo hostingModule, IDataSource dataSource, InstancePurposes instancePurposes, SxcInstance sxcInstance, Log parentLog) in C:\Projects\2SexyContent\Web\DesktopModules\ToSIC_SexyContent\SexyContent\Engines\EngineBase.cs:line 64 at ToSic.SexyContent.Search.SearchController.GetModifiedSearchDocuments(ModuleInfo moduleInfo, DateTime beginDate) in C:\Projects\2SexyContent\Web\DesktopModules\ToSIC_SexyContent\SexyContent\Search\SearchController.cs:line 143 at ToSic.SexyContent.Environment.Dnn7.DnnBusinessController.GetModifiedSearchDocuments(ModuleInfo moduleInfo, DateTime beginDate) in C:\Projects\2SexyContent\Web\DesktopModules\ToSIC_SexyContent\Environment\Dnn7\DnnBusinessController.cs:line 85 --- End of inner exception stack trace --- at ToSic.SexyContent.Environment.Dnn7.DnnBusinessController.GetModifiedSearchDocuments(ModuleInfo moduleInfo, DateTime beginDate) in C:\Projects\2SexyContent\Web\DesktopModules\ToSIC_SexyContent\Environment\Dnn7\DnnBusinessController.cs:line 89 at DnnSharp.Common2.Services.Dnn.ModuleService.<GetSearchItems>d__4.MoveNext() at DnnSharp.SearchBoost.Core.ContentSource.DnnModules.<GetIndexingJobsForTabModules>d__26.MoveNext() at DnnSharp.SearchBoost.Core.ContentSource.DnnModules.<GetIndexingJobs>d__25.MoveNext() at DnnSharp.SearchBoost.Core.ContentSource.DnnModules.<Query>d__20.MoveNext() at DnnSharp.SearchBoost.Core.Services.QueryContentSourcesService.QueryAllContentSourcesToCache(SearchBehavior behavior, List1 cache, CancellationTokenSource cancellationToken) --- End of inner exception stack trace ---

Bogdan Litescu
  • 845
  • 8
  • 8
  • I think the general exceptions were caused by certain 2sxc modules on my site with errors in the code behind razor templates, for example in the above it mentions 'Environment_Filter_App_cshtml' which was one such module. I made changes to certain modules and it threw errors on certain views which when I re indexed my site it may have threw exceptions to these modules. I will mark as complete for now and once I am fully satisfied no 2sxc module view is displaying an error on my site and this exception occurs once more I will re visit this thread post. Thanks Bogdan and Daniel for your help! – denisjoconnor Nov 17 '17 at 14:15