Back to Blog

Citrix Presentation Server Settings and LoadRunner

Recently I was working on a Citrix testing project with LoadRunner and I was reminded of all the server settings for the Citrix servers and Generators that have to be checked, in addition to all of the Vugen script run-time settings, and script enhancement. In some cases, we at Loadtester have had to become part-time Citrix server administrators to get our projects done on time. One of the Citrix server settings we always recommend initially is for any session that disconnects to be reset to login, instead of leaving it open. This would prevent us from scripting, so I never forget that. However, I ran into other issues later that required more research.

Everything was fine with a single Vuser in VUGen, and a single Vuser in the Controller. Even with three Vusers running in a single group, I had no errors running the test for more than an hour. This indicated my scripts were working. Since I was choosing random data for each iteration, my data was good. Problems did not start until I added addtional scripts and groups. I had multiple Citrix servers (10 of them to be exact) and once I hit 11 sessions, users started to drop off with errors. This told me that something was jacked up once all Citrix servers had at least one session going. I reviewed the Vuser log and found a couple of different problems. One was a message that said “Unexpected Disconnect”. Not much to go on. Other sessions had totally aborted, and left behind was a C++ error popup on the LoadRunner Generator. I opened a ticket at HP Support and the first thing they wanted to check was Citrix server configuration settings. Here is what they recommended:

To enable more than one instance of the same user, the following modifications should be made in the Management Console for the Citrix Presentation Server:

Select the server properties screen and uncheck the following option in the “Application Limits” section:

  • Limit instance allowed to run in the server farm
  • Allow only one instance of applications for each user

To ensure that each user instance receives a clean Citrix session, the following modifications should be made using the Connection Configuration Tool for the Citrix Presentation Server:

Open the “Citrix Connection Configuration” dialog box (Choose Programs > Citrix > Administration Tools > Citrix Connection Configuration Tool),

  • Select the ica-tcp connection name and choose Connection > Edit. Alternatively, double-click on the connection. The “Edit Connection” dialog box will open,
  • Click the Advanced button. The “Advanced Connection Settings” dialog box will open,
  • In the bottom section of the dialog box, clear the “inherit user config” check box adjacent to the “On a broken or timed-out connection” list box.
  • Change the entry for this list box to “reset”, Click OK.”

After checking all of these things, it had not solved the problem. However, we did find an additional setting that needed to be addressed in Microsoft Terminal Services configuration:


“Restrict Each User to 1 Session” need to be unselected (or “no”). I re-ran the same test and had no problem until I tried to get more than 40 sessions on a Load Generator. At that point I remembered that we had installed Terminal Services on the Load Genertors to be able to span Terminal Sessions with a number of virtual users in each.

In LoadRunner, select the Load Generator dialog box and select the Generator you want to set up. Select “Details”, and click on the “Terminal Services’ tab. You will have to enable it. See the image below:

Notice the default is 2 Terminal Server Sessions, and 50 Vusers per session. Depending on the specs of the Generator, the number of GDI Resources and Memory each session takes up, you will want to adjust this number. For Windows 2000, the GDI resource limitation is a little over 16,000 and in Windows 2003 it is more like 65,000. Keep this in mind, because you have to combine this with your RAM and CPU limitations of the Generator to determine how many Vusers you can get on each Generator. In my case, I each Generator Citrix Session took up 43 GDI objects and 15 Megs of RAM. You can tel ths by simply looking at Task Manager on the Generator and adding the GDI Objects column.

Remember that when you are working on testing Citrix Vusers, there is more to setup than just the LoadRuner lab machines. You need to have a firm grasp on Citrix and Terminal Server configuration settings and know how they affect the Vuser session connections.

Back to Blog