Monday, April 2, 2012

Recommended Debugging Steps if Controller crashes

If LoadRunner crashes there are certain measures we make apply to debug the system.
First thing is to login into the system as local Administrator.
It is known that anti-virus software is intrusive when they are set to look for viruses. However, in searching for viruses, the software can interfere with a program's proper execution. This could cause problems and sometimes crashes. This is why, for debugging purposes, it is recommended to turn off the anti-virus software.

Disk Space
Make sure that you have enough disk space available on the controller and load generators. During scenario execution, the events are written onto the Load Generator machines and are saved locally until the scenario finished; where results are send back to the Controller. If the machine does not have enough disk space, it can cause problem.

Make Sure that the Temp directory is outside the User’s default Temp directory.

To check available memory on a machine:
Right-click the status bar, and select Task Manager. Select the Performance tab to check the physical memory available. Select the Processes tab to check which processes have high memory consumption in the CPU column.

To free up memory:
• close any unnecessary processes running on the machine, and try running the scenario again.
• Restart your computer.
• If the problem persists, reduce the number of virtual users that you are running on the same machine.
To boost performance, and allow more Virtual Users to run on the load generator machine:
•On Windows 2000 machines, select Start -> Settings -> Control Panel -> System -> Advanced -> Performance Options, and select the Background Services option.
On Windows NT machines, select Start -> Settings -> Control Panel -> System Properties > Application Performance. Set Performance boost to "None."
Check if the size of the output.mdb file in the results folder is more than 2 GB
If the output.mdb file becomes greater than 2GB during a load test, Controller is unable to write into it anymore and cause a crash.
Try to recreate the Controller’s initialization file

Sometimes, the initialization files can become corrupted (e.g. after a crashed). You will have problem in launching or using the Controller after that. Use the following steps to do delete the initialization file so that a new copy will be created:
1. Shut the Controller.
2. Navigate to the C:\Winnt ( or C:\Windows for Windows XP machine )
3. Delete all files that begin with wlrun*. For example,
wlrun.ini, wlrun5.ini, wlrun7.dft, wlrun7.hst, wlrun7.ini
Reboot
When programs crash, they leave the system in an unstable state. This can cause many other problems that seem to have no apparent reason for happening or has not happened before. When the system is rebooted, it resets the system into a more stable state. This should be done after any program crashes.
Verify the information in the event viewer
Sometimes, if a program crashes, it does not give any clues for what had happened. By using the Windows event viewer, it may be possible to find some clue as to what happened when the crash occurred. The event viewer can be launched from Start -> Programs -> Administrative Tools -> Event Viewer.
Verify other programs are interfering with Controller

To find out whether hooked DLLs are possibly causing a problem, you can use a third party utility call "Process Explorer." This utility has the ability to view the DLLs loaded by an application. It can be downloaded free of charge from the following link:
http://technet.microsoft.com/en-us/sysinternals/bb896653.aspx

This can be used to see if LoadRunner loaded any other program's DLLs. Use the following steps to do this:
1. Unzip the .zip file, which was downloaded from the above URL, into a directory where you wish to install Process Explorer.
2. Start the Controller.
3. Run the Process Explorer (procexp.exe) from the directory into which you unzipped it (step a).
4. Select wlrun.exe (Controller) from the top section of Process Explorer.
5. The bottom section should be displaying a list of DLLs. If it is showing handles for the application, go to the "View" menu and select "DLLs."
6. Search through the list to see if any other program's DLLs are loaded. Normally, only DLLs from the \bin directory and standard Microsoft directories are loaded. For example, if you see wbhook32.dll (McAfee VirusScan hooking DLL) loaded by LoadRunner, then you would want to shut down the anti-virus software.

No comments:

Post a Comment