DovetailSoftware / dovetail-bootstrap

Get started writing Dovetail SDK applications. Included is an example of a web application using FubuMVC and Windows service application using Topshelf.
http://www.dovetailsoftware.com/blogs/kmiller/archive/2012/01/24/introducing-dovetail-bootstrap
Other
6 stars 5 forks source link

History.Parser.HistoryItemParser.ParseEmailLog times out on a HUGE email #37

Open gsherman opened 6 years ago

gsherman commented 6 years ago

likely the regex is timing out. when we've run into issues like this before, we've executed the regex on its own thread with a timeout, so we can trap for it and handle it.

this seems like a very unrealistic test

2017-11-13 18:59:05,923 [13] ERROR Agent.Core.Configuration.UnhandledExceptionLoggingBehavior - (null) A route /agent/core/history?Id=1002813&Type=case&IsVerbose=false&_=1510627020603 caused an exception that was not handled. 
System.Threading.ThreadAbortException: Thread was being aborted.
   at Dovetail.SDK.Bootstrap.History.Parser.HistoryItemParser.ParseEmailLog(String input)
   at Dovetail.SDK.Bootstrap.History.Parser.HistoryOutputParser.EncodeEmailLog(String input)
   at Dovetail.SDK.Bootstrap.History.CommonActEntryBuilderDSLExtensions.EncodeEmail(IHistoryOutputParser historyOutputParser, HistoryItem item)
   at Dovetail.SDK.Bootstrap.History.HistoryItemAssembler.createActivityDTOFromMapper(ActEntry actEntry, IDictionary`2 templateRelatedGenerics)
   at System.Linq.Enumerable.WhereSelectListIterator`2.MoveNext()
   at System.Linq.Enumerable.WhereEnumerableIterator`1.MoveNext()
   at System.Collections.Generic.List`1..ctor(IEnumerable`1 collection)
   at System.Linq.Enumerable.ToList[TSource](IEnumerable`1 source)
   at Dovetail.SDK.Bootstrap.History.HistoryItemAssembler.Assemble(ClarifyGeneric actEntryGeneric, IDictionary`2 templatesByCode, HistoryRequest historyRequest)
   at Dovetail.SDK.Bootstrap.History.HistoryBuilder.Build(HistoryRequest request, Action`2 genericAction)
   at Dovetail.SDK.Bootstrap.History.AssemblerPolicies.CaseHistoryAssemblerPolicy.BuildHistory(HistoryRequest request)
   at Dovetail.SDK.Bootstrap.History.HistoryAssembler.GetHistory(HistoryRequest request)
   at FubuMVC.Core.Behaviors.OneInOneOutActionInvoker`3.performInvoke()
   at FubuMVC.Core.Behaviors.BasicBehavior.Invoke()
   at FubuMVC.Core.Continuations.ContinuationHandler.InvokeNextBehavior()
   at FubuMVC.Core.Continuations.ContinuationHandler.performInvoke()
   at FubuMVC.Core.Behaviors.BasicBehavior.Invoke()
   at FubuMVC.Core.Behaviors.BasicBehavior.<.ctor>b__0()
   at FubuMVC.Core.Behaviors.BasicBehavior.Invoke()
   at FubuMVC.Core.Behaviors.BasicBehavior.<.ctor>b__0()
   at FubuMVC.Core.Behaviors.BasicBehavior.Invoke()
   at Agent.Core.Configuration.UnhandledExceptionLoggingBehavior.wrapBehaviorInLogger(Action action)
2017-11-13 19:00:05,549 [18] WARN  Dovetail.SDK.Bootstrap.History.Parser.HistoryItemParser - (null) Could not parse email log. Contents:
gsherman commented 6 years ago

gist containing the one single huge email:

https://gist.github.com/anonymous/5b1bc45a8d3b8fbb9ee93cbf9b33a7a3

2,739,184 bytes 2,739,184 characters 523,540 words 2531 lines