Selenium Server as a Windows Service: Using NSSM: Hard Disk Filling Up

696 views
Skip to first unread message

Vimal Olaganathan

unread,
Jan 13, 2016, 9:37:37 PM1/13/16
to Selenium Users
I am using NSSM (https://nssm.cc/) to run my Selenium Remote Server instance as a Windows Service on a Windows 7 instance. This box is not being used for anything other than running the Selenium Server. 

After letting the box run for a few days, while running test cases against this server, I noticed that the hard disk was being filled up. Many files (~30 GB) began to appear in the following folder: C:\Windows\SysWOW64\config\systemprofile\AppData\Local\Microsoft\Windows\Temporary Internet Files\Content.IE5

Is there something that I am missing in terms of configuration to have these files cleared out automatically? I have had to go in every few days to clear these temporary files out, which I would like to avoid.

I used the following command to create the service:
nssm install seleniumhub java -jar C:\selenium-server\selenium-server-standalone-2.48.2.jar -Dwebdriver.chrome.driver=C:\selenium-server\chromedriver.exe -Dwebdriver.ie.driver=C:\selenium-server\IEDriverServer.exe


I have set this Windows service to log on as a Local System Account, and I've allowed the service to interact with the desktop.

Any help is greatly appreciated!

Serguei Kouzmine

unread,
Jan 14, 2016, 11:58:10 PM1/14/16
to Selenium Users
Hello Vimal

Have you tried configure registry settings to force IE cache flush on exit ?
popd
$hive = 'HKCU:'
$path = '/Software/Microsoft/Internet Explorer/Privacy'
$name = 'ClearBrowsingHistoryOnExit'
$value = '1'
$propertyType = 'Dword'

change_registry_setting -hive $hive -Name $name -Value $value -PropertyType $propertyType


where change_registry_setting (not shown here) basically does
Set-ItemProperty -Path ('{0}/{1}' -f $hive,$path) -Name $name -Value $value

Thanks, let me know if you need more help

Serguei Kouzmine

David

unread,
Jan 15, 2016, 2:05:58 PM1/15/16
to Selenium Users
Good to know Serguei. But I'm wondering, should running such service with Selenium & IEDriver really generate that much cache content (30GB)? Makes me wonder how frequent the OP runs tests and what is being tested that would cache that much data.

Also would be good to know what the default cache & browser history settings (e.g. cache size limit, # days to keep history, etc.) for IEDriver are - is it tied to the account used to run it?
Reply all
Reply to author
Forward
0 new messages