Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Michael 125 posts 409 karma points
    Oct 31, 2016 @ 06:29
    Michael
    0

    OutOfMemoryException: Exception of type 'System.OutOfMemoryException' was thrown. [Returned while handling GET Request]

    Hi all,

    I have special url to check web site check for azure load balancer /health

    with correct setup in reserved url and http handler.

    but I noticed that my health url throw exception:

    [Exception of type 'System.OutOfMemoryException' was thrown.]
    
     System.Runtime.CompilerServices.RuntimeHelpers._CompileMethod(IRuntimeMethodInfo method):-1
     System.Reflection.Emit.DynamicMethod.CreateDelegate(Type delegateType, Object target):15
     System.Linq.Expressions.Compiler.LambdaCompiler.CreateDelegate():34
     System.Linq.Expressions.Compiler.LambdaCompiler.Compile(LambdaExpression lambda, DebugInfoGenerator debugInfoGenerator):20
     Umbraco.Core.Persistence.Querying.PocoToSqlExpressionHelper`1.VisitMemberAccess(MemberExpression m):156
     Umbraco.Core.Persistence.Querying.BaseExpressionHelper`1.Visit(Expression exp):217
     Umbraco.Core.Persistence.Querying.BaseExpressionHelper`1.VisitBinary(BinaryExpression b):576
     Umbraco.Core.Persistence.Querying.BaseExpressionHelper`1.Visit(Expression exp):243
     Umbraco.Core.Persistence.Querying.BaseExpressionHelper`1.VisitLambda(LambdaExpression lambda):60
     Umbraco.Core.Persistence.Querying.BaseExpressionHelper`1.Visit(Expression exp):204
     Umbraco.Core.Persistence.PetaPocoSqlExtensions.Where[T](Sql sql, Expression`1 predicate):6
     Umbraco.Core.Sync.DatabaseServerMessenger.ProcessDatabaseInstructions():5
     Umbraco.Core.Sync.DatabaseServerMessenger.Sync():145
     Umbraco.Web.BatchedDatabaseServerMessenger.UmbracoModule_RouteAttempt(Object sender, RoutableAttemptEventArgs e):22
     Umbraco.Web.UmbracoModule.OnRouteAttempt(RoutableAttemptEventArgs args):7
     Umbraco.Web.UmbracoModule.ProcessRequest(HttpContextBase httpContext):155
     Umbraco.Web.UmbracoModule.<Init>b__8(Object sender, EventArgs e):19
     System.Web.HttpApplication+SyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute():65
     System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously):21
    

    I'm very surprised when I saw that my request try to update Umbraco cache from db. How I can disable this?

    I need simple url without any Umbraco logic.

    Thanks, Mike

  • Dave Woestenborghs 3504 posts 12133 karma points MVP 8x admin c-trib
    Oct 31, 2016 @ 09:09
    Dave Woestenborghs
    0

    Hi Mike,

    Just checking. Did you add your url to the umbracoReservedUrls app setting ?

    Dave

  • Michael 125 posts 409 karma points
    Oct 31, 2016 @ 09:34
    Michael
    0

    Yes, because I need 200 and 426 instead of 404.

  • Dave Woestenborghs 3504 posts 12133 karma points MVP 8x admin c-trib
    Oct 31, 2016 @ 10:21
    Dave Woestenborghs
    0

    Hi Michael,

    Can you show the web.config part on how you configured it ?

    Dave

  • Michael 125 posts 409 karma points
    Oct 31, 2016 @ 12:15
    Michael
    0
    <add key="umbracoReservedPaths" value="~/umbraco,~/install/,~/content,~/scripts,~/api,~/Content/views, ~/health" />
    
    <httpHandlers>
    <add verb="GET" path="/health*" type="HealthHandler" />
    </httphandlers>
    
    <handlers>
    <add name="HealthCheck" path="/health*" verb="GET" type="HealthHandler" />
    </handlers>
    
  • Dave Woestenborghs 3504 posts 12133 karma points MVP 8x admin c-trib
    Oct 31, 2016 @ 12:16
    Dave Woestenborghs
    0

    And what is the url that you call ?

    Dave

  • Michael 125 posts 409 karma points
    Oct 31, 2016 @ 12:19
    Michael
    0

    sitename.com/health

  • Dave Woestenborghs 3504 posts 12133 karma points MVP 8x admin c-trib
    Oct 31, 2016 @ 12:18
    Dave Woestenborghs
    0

    Because I think you need to add the entire url to umbracoReservedUrls

  • Michael 125 posts 409 karma points
    Oct 31, 2016 @ 13:12
    Michael
    0

    Hi Dave,

    Sorry, but this path was added and everything is working well. (<add key="umbracoReservedPaths" value="~/umbraco,~/install/,~/content,~/scripts,~/api,~/Content/views, ~/health" />) I received this error once and see in stack trace call stack with cache update.

    If I remove this url I receive Umbraco page not found page.

    Thanks, Mike

  • Dave Woestenborghs 3504 posts 12133 karma points MVP 8x admin c-trib
    Oct 31, 2016 @ 13:13
    Dave Woestenborghs
    100

    You are adding it to umbracoReservedPaths. I think you need to add it to umbracoReservedUrls

    Dave

  • Michael 125 posts 409 karma points
    Nov 01, 2016 @ 10:17
    Michael
    0

    Hope this can help me.

    Thanks, Mike

Please Sign in or register to post replies

Write your reply to:

Draft