Tuesday 2 June 2009

Out of system resources in Citrix Environment [Fix]

Oil Reserves in DoubtOver the past few months we have been struggling with a problem that was affecting users who were running a particular application on our Citrix servers.

The symptoms were a message saying 'out of system resources' in the application and general slowness of the session. Users couldn't save their work in the application until we reset their session although sometime the application would come back to life if we closed all other applications in the users session.

We never saw the error on Windows XP systems when user were not on Citrix.

When we asked the 3rd party developers about the issue, they said that they had never seen the error but it looked like a memory issue.

All the Citrix server are 64bit servers with atleast 16GB of memory. When monitoring the system we found that the maximum memory usage throughout the day was around 10GB.

We finally narrowed the problem to the allocation of memory per session and started to research this area. Finally we found a registry setting called SessionPoolSize under HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Memory Management. This setting was initially set to 32Mb on all our Citrix servers all the literature on the web stated that 64Bit servers should have a value of atleast 64Mb by default.

We increase the value of SessionPoolSize to 64Mb and noticed that there was a reduction in helpdesk calls relating to the dreaded 'out of system resources' error. We increased the value to 128Mb and then 256Mb. Since the change we have had no 'out of system resources' and things look promising. We will probably see how it goes for the next week just to make sure that everything is ok.

The webpage that helped us find the solution is http://support.microsoft.com/kb/840342

It seems that applications that have a large graphical foot print are most likely to affect the session pool size. Some examples are powerpoint and image manipulation programs. In our case it wasn't a graphical programs but a large database application with many complicated forms with numerous text boxes and dropdown boxes.

I really hope that this post helps someone as this problem was a major headache for us.

No comments: