Users take over a minute to log onto a 2008 windows server. LSM.exe running at 100MB+ memory

memory leakremote desktopwindows-server-2008

We've a 64bit Windows Server 2008 running Remote Desktop.

The application lsm.exe (the local session manager) appears to be leaking memory. Although the memory usage is quite low when the server is rebooted, this continues to climb until people can no longer log in.

The server has no audio card and does not have any AV software installed.
The server is fully service packed. (Service pack 2)

It has 8GB memory.
60 users regularly use it.
There seem to be no relevant event log messages.
The login does not start explorer. It starts a "login.vbs" script.
This login script creates several wsShell and wScript.Network objects, but even if I comment these out, I still get the same behaviour.
(note – I swapped the .vbs script for an executable. No difference)

There are multiple applications installed, but the only one of note is :
perfectbackup – A java based backup solution.

The memory leak seems to happen when people log in / log out of Remote Desktop.
e.g. Logging in will change the lsm memory size from 21,180K to 21,512K. Logging out will change the usage from 21,512K to 12,668K.
This may go down later on, but the general movement is upwards. Also – This will go up faster, and stay up if I log in / out several times.

What could be causing this, and how would I fix it?

Best Answer

How many sessions are generally active on your machine? If users are disconnecting their sessions, instead of logging off, that can cause the kind of problems you are seeing. One thing I've seen done to resolve this is to force disconnected sessions to log out after a short period of inactivity (1 to 2 hours) - that has resolved this type of issue for me in the past.