Error while evaluating expression : Evaluation timeout in the expression

Baimey Rajesh asked on April 19, 2018 10:12

Hi Team,

I have been working on a Kentico 10 project for our client hosted on Azure Webapps

The website is being offline once in a while since the launch.


Some macroresolver errors are found in the LOGS:

System.Threading.ThreadAbortException: Thread was being aborted.
  at CustomMacros.GetSiteNavigation(Object[] parameters)
  at CMS.MacroEngine.MacroMethod.ExecuteMethod(EvaluationContext context, Object[] parameters)
  at CMS.MacroEngine.ExpressionEvaluator.ExecuteMethod(IMacroMethod method, IEnumerable`1 parameters)
  at CMS.MacroEngine.ExpressionEvaluator.EvaluateMethodCall(Boolean& match, Boolean& securityPassed)
  at CMS.MacroEngine.ExpressionEvaluator.EvaluateInternal(Boolean& match, Boolean& securityPassed)
  at CMS.MacroEngine.ExpressionEvaluator.Evaluate()
  at CMS.MacroEngine.MacroResolver.ResolveMacroExpression(ResolveExpressionSettings settings)

and the next error I found is time out errors. one of the below kind

CMS.MacroEngine.EvaluationTimeoutException: Evaluation timeout in the expression 'maxSideSize = 480;

width = CurrentDevice.ScreenPixelsWidth;
height = CurrentDevice.ScreenPixelsHeight;

if (!CurrentDevice.IsMobile
   || ((width > maxSideSize)||(height > maxSideSize))){
   return false;
}

return true;|(user)administrator|(hash)38958fe170d553737b152e9dadf5bf8b7c4b5672f9137ce874775c7fde562181' with overtime 00:00:00.0010610. Check the expression for infinite loops or increase the timeout.
  at CMS.MacroEngine.ExpressionEvaluator.CheckForTimeout()
  at CMS.MacroEngine.ExpressionEvaluator.EvaluateInternal(Boolean& match, Boolean& securityPassed)
  at CMS.MacroEngine.ExpressionEvaluator.EvaluateChild(MacroExpression childExpr, Boolean& match, Boolean& securityPassed)
  at CMS.MacroEngine.ExpressionEvaluator.EvaluateMethodCall(Boolean& match, Boolean& securityPassed)
  at CMS.MacroEngine.ExpressionEvaluator.EvaluateInternal(Boolean& match, Boolean& securityPassed)
  at CMS.MacroEngine.ExpressionEvaluator.EvaluateChild(MacroExpression childExpr, Boolean& match, Boolean& securityPassed)
  at CMS.MacroEngine.ExpressionEvaluator.EvaluateCondition(Boolean& match, Boolean& securityPassed, DataRow drLogItem, DateTime evaluationStarted)
  at CMS.MacroEngine.ExpressionEvaluator.EvaluateInternal(Boolean& match, Boolean& securityPassed)
  at CMS.MacroEngine.ExpressionEvaluator.EvaluateCompoundExpression(Boolean& match, Boolean& securityPassed)
  at CMS.MacroEngine.ExpressionEvaluator.EvaluateInternal(Boolean& match, Boolean& securityPassed)
  at CMS.MacroEngine.ExpressionEvaluator.Evaluate()
  at CMS.MacroEngine.MacroResolver.ResolveMacroExpression(ResolveExpressionSettings settings)

This is very urgent. What should I do to fix the issue? Thank you very much for your help.

Recent Answers


Trevor Fayas answered on April 19, 2018 14:29

Can you paste the original macro? Also you can go to system - macros and there's a tool there to test your macros for performance issues.

0 votesVote for this answer Mark as a Correct answer

james hd answered on April 19, 2018 16:21

Thank you so much for asking such a good question. Even i have another doubt, but i was solved after see this post.Here is the link link text. Please share the future updates.

0 votesVote for this answer Mark as a Correct answer

   Please, sign in to be able to submit a new answer.