Troubleshooting Memory leaks

Document ID: 10418

Synopsis

This doecument should only be used in conjunction with a Support Engineer.

More Information

Troubleshooting Memory leaks

This doecument should only be used in conjunction with a Support Engineer.

Where the word 'ServiceName' is used please replace with the Service needs to be monitored. To perform the memory tracing we need to do the following -

  1. Download and install the latest Windows Debugging tools from this location - http://www.microsoft.com/whdc/devtools/debugging/installx86.mspx

  2. Setup Performance Monitor Counters

    1. Open performance Monitor and expand 'Performance Logs and Alerts'
    2. Select 'Counter logs'
    3. Right click and select 'New Log Settings'.
    4. Name is ServiceName Trace
    5. Click Add Counter and select the below options
      • Performance Object = Process
      • Select Counters from list = Private Bytes
      • Instance = ServiceName
    6. Change the Interval to 5 Seconds from 15 seconds.
    7. Click ok and the counter will be logging the information

      Leave this running for the period of the gathering of the information.

  3. Installing vadump

    1. Download this file vadump.zip from this FTP location ftp.rockliffe.com/mailsite/tools/vadump.zip
    2. Unzip the file into the MailSite install directory.
  4. Setting up MailSite logging

    • Enable within the 'Server log Flags' - 'Service start and stop'
    • Enable within the 'Operational log Flags' - 'Protocol exchanges'
  5. Setting up MailSite Tracing

    1. Open the registry to this location - HKLM\Software\Rockliffe\MailSite
    2. Add a new String with the name of - EventCaptureRules
    3. Then add this entry without the single quotes- '::::16'
  6. Running the test.

    At **no point** during the test should the Service be stopped as this will invalidate all the data being gathered and end in us asking for the test to be run again.

    1. Stop the Service
    2. Start the Service
    3. Start our Tracing with this control code from the command prompt within the MailSite install directory

      ServiceName -control 133 -silent

    4. Start our memory tracing with this control code from the command prompt within the MailSite install directory

      ServiceName -control 136 -silent

    5. Leave the service running for 2 minutes then run this command from the MailSite install directory

      ServiceName -control 135 -silent

    6. Also run this command from where you install the Windows Debugging tools

      • cscript adplus.vbs -hang -pn ServiceName.exe -quiet -o c:\adplus

        And at the same time run this command from the MailSite install directory and make sure you take a copy of this file.

      • ServiceName -control 130 -silent
    7. Then from Task Manager find the PID number for the Service then run this command for vadump

      vadump -sot -PID > vadumpstart.txt

    8. Then let it run ***until the usage has grown by at least 30%***, such that the leak is unambiguous. For the issues to be see you need to have at least 200+ MB's shown in Task Manager Memory Usage Column before running the below commands.
      • ServiceName -control 135 -silent
      • cscript adplus.vbs -hang -pn ServiceName.exe -quiet -o c:\adplus
      • ServiceName -control 137 -silent
      • ServiceName -control 134 -silent
      • ServiceName -control 130 -silent
      • Stop the Performance counter trace.
      • vadump -sot -p PID > vadumpFinish.txt

We have now concluded the information gathering. This is what we need uploaded to the Cases FTP location.

  1. Zip the two ADPLUS hang dumps. These need to be in their own zip file called ADPLUS.zip

    Then the below files in a separate zip file called TraceInformation.zip

  2. Find the ServiceName.Memory-Trace.TXT
  3. Find the ServiceNameDUMP.TXT or ServiceNameDUMP.XML
  4. Zip the Performance counter log
  5. The two VADump traces
  6. All the MailSite logs

Then upload to the FTP share that has been assigned to your case.