We have moved to GitHub Issues
Created by Sebastiaan Janssen 19 Aug 2012, 14:53:53 Updated by Pedro Gomes Adão 01 Feb 2013, 15:06:41
Under heavy load I get the following error in macro.cs. I'm logging the error from the catch block on line 386. This is Umbraco 22.214.171.124
Thread was being aborted. at umbraco.MacroEngines.RazorMacroEngine.Execute(MacroModel macro, INode currentPage) at umbraco.macro.loadMacroScript(MacroModel macro) at umbraco.macro.renderMacro(Hashtable pageElements, Int32 pageId)
''Originally created on CodePlex by [morfy50|http://www.codeplex.com/site/users/view/morfy50]'' on 2/14/2012 6:21:05 AM [Codeplex ID: 30734 - Codeplex Votes: 2]
I get this on my live website running on 4.7.2. And I have to note that "heavy" load is relative, but not all that heavy in most contexts (around 5 million hits a year --> 10 hits a minute average).
We experience sporadic Razor macro load errors on 4.7.2. The site has about 5 requests per a second. Trace message: umbracoMacro Error loading MacroEngine script (file: [Ad]SearchForm.cshtml, Type: '' Thread was being aborted. at umbraco.macro.renderMacro(Hashtable pageElements, Int32 pageId)
Igor, make sure to read and participate in [this thread|http://our.umbraco.org/forum/developers/api-questions/8584-Severe-Issue-with-macro-caching-under-heavy-load?p=14] to figure out what your specific problem might be. I am actually expecting it's an issue with your code and not in the core as the fix was provided for 4.7.2. Although, it could be something we've missed but it doesn't look like it.
Sebastiaan, I've passed through the thread. Doesn't look to be our case. The problem does not seem to be related to our code - different macros fail arbitrarily but work well after page refresh. We are updating the website to 4.9. Hopely the issue is resolved there.
We have transfered the website code to a clean 4.9 installation and still experience the mentioned problem. Random macro fail at random times on page load once in 20 or 30 page reloads. But when you hit reload after it, the page refreshes with no errors. Any advise beside debugging Umbraco code?
@Igor does your code use Response.Redirect("some url", true); somewhere instead of Response.Redirect("some url", false);? Try the logging mentioned at the last post here: http://our.umbraco.org/forum/developers/api-questions/8584-Severe-Issue-with-macro-caching-under-heavy-load?p=16
Other than that, everybody who was experiencing this problem before is now reporting it fixed in the new version.
Hi Igor, In my case it was calls to Response.Redirect(url) without the 2nd parameter set to false that was causing the issue. Changing to
Response.Redirect(url, false); Context.ApplicationInstance.CompleteRequest();
throughout my project fixed my issue.
Indeed, I see a number of such redirects in several of our macros - not much relevant to ones that I noticed failed. Will try your fix and see what changes.
From my limited understanding of IIS and .Net pipelines, this is impossible, but practical facts tend to indicate that "other users' requests" were making other requests "end" prematurely... Quite odd...
Works perfectly after the fix. Thanks
I have this error on 4.7.2. Do I have to upgrade umbraco to 4.8 or just change all my Response.Redirect to "false"?
Upgrade does not help. You should update all redirect method calls
Thank you so much. =)
Backwards Compatible: True
Due in version: 4.8.0