3

We started using Razor Mediator 1.3.3 for our template designs. We notice there is memory leak during the publishing. We have written some reusable custom function razor and using in our razor design. Other than that it is simple razor code for creating the design.

This is the razor setting on the tridion configuration

<razor.mediator extractBinaries="true" adminUser="INSERT TRIDION USERNAME">
    <namespaces/>
    <assemblies/>
    <imports>
      <add import="C:\Program Files (x86)\Tridion\Razor Mediator\helper.cshtml" />
    </imports>
    <importSettings includeConfigWhereUsed="false" includeImportWhereUsed="true" replaceRelativePaths="false" />
</razor.mediator>

Please help in troubleshooting the issues. Is there anything we are missing.

NOTE we are using Tridion 2011 sp1

1
  • Version 1.3.3 specifically addressed a memory leak issue during publishing (per Alex Klock's post and the change log). Do you still have the issue without your custom function(s)? Aug 30, 2014 at 15:41

1 Answer 1

3

As with all memory leaks, it's important to be sure what you mean by "leak". Even in version 1.3.3 some memory will be allocated for every Razor building block that is compiled. This will not be reclaimed if a new version of the building block is compiled. In one sense this is a leak, but one which would not be expected to be a problem in production. On your development server, where you are perhaps frequently altering your templates, you may see the memory use go up more significantly. This is "as good as it gets" with the current architecture, which uses the same AppDomain for each invocation.

Again - it's important to know what you mean by "leak". Does it occur in general use? Can you isolate it to a specific template? Are there other tests you could do to isolate the cause? How are you measuring memory use? (I'd start with measuring the private bytes of the process using perfmon.) When you see increased memory, is this correlated with any other measures on your system, or with specific activity?

You may find it helpful to get the sources and make your own build of the mediator. Firstly, reading the code should help you to understand how it works, and maybe you can attach a debugger, or make your own custom version to help you to understand the problem.

5
  • Hi Dominic, Thank you very much for you reply. We are seeing the problem only in UAT and Production environment. NOT in Dev/Testing environment. We are building the content and publish is going on now and seeing the publisher memory utilization spiking and at one stage the publish process is killing the server.
    – Gnana
    Sep 1, 2014 at 4:09
  • Just one more thing you might check. Are you absolutely certain that 1.3.3 is deployed on the UAT and Production environments? Sep 1, 2014 at 12:03
  • Yeah... First thing i checked was the version on config file. Its 1.3.3. Thanks!
    – Gnana
    Sep 1, 2014 at 14:23
  • 1
    You need to check the version of the DLL that's deployed in the GAC. Sep 1, 2014 at 14:31
  • Hi Dominic, I checked the file version on the server. it is same 1.3.3.1
    – Gnana
    Sep 2, 2014 at 1:28

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.