how to configure session timeout with the webdriver.server.session.timeout system property?

4,377 views
Skip to first unread message

baijing...@gmail.com

unread,
Mar 21, 2014, 6:32:00 AM3/21/14
to seleniu...@googlegroups.com
for such issue:
Session 50339470-eb8d-4181-867a-02a8258ac031 deleted due to client timeout

I did some search, and found this answer: https://code.google.com/p/selenium/issues/detail?id=3224

some one said "You can configure this timeout with the webdriver.server.session.timeout system property."

but how??

I tried below command, but con't work

baijingjiaotekiMacBook-Air:~ baijingjiao$ java -D webdriver.server.session.timeout 3600

Exception in thread "main" java.lang.NoClassDefFoundError: webdriver/server/session/timeout
Caused by: java.lang.ClassNotFoundException: webdriver.server.session.timeout
at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
at java.lang.ClassLoader.loadClass(ClassLoader.java:247)

Krishnan Mahadevan

unread,
Mar 21, 2014, 7:29:48 AM3/21/14
to Selenium Users
JVM arguments begin with a hyper capital D [ -D] and there shouldnt be any space between -D and the actual arg.

So it should be -Dwebdriver.server.session.timeout [ You have a space in between]

Thanks & Regards
Krishnan Mahadevan

"All the desirable things in life are either illegal, expensive, fattening or in love with someone else!"
My Scribblings @ http://wakened-cognition.blogspot.com/
My Technical Scribbings @ http://rationaleemotions.wordpress.com/


--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to selenium-user...@googlegroups.com.
To post to this group, send email to seleniu...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/selenium-users/61126857-a960-45e8-b13e-b44c26fa2bdb%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

baijing...@gmail.com

unread,
Mar 23, 2014, 10:03:55 AM3/23/14
to seleniu...@googlegroups.com
Thank you !

在 2014年3月21日星期五UTC+8下午7时29分48秒,Krishnan写道:

baijing...@gmail.com

unread,
Mar 23, 2014, 10:35:30 AM3/23/14
to seleniu...@googlegroups.com
I remove the space, still got the error:

localhost:portal baijingjiao$ java -Dwebdriver.server.session.timeout 3600
Exception in thread "main" java.lang.NoClassDefFoundError: 3600
Caused by: java.lang.ClassNotFoundException: 3600
at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
at java.lang.ClassLoader.loadClass(ClassLoader.java:247)

在 2014年3月23日星期日UTC+8下午10时03分55秒,baijing...@gmail.com写道:

Krishnan Mahadevan

unread,
Mar 23, 2014, 10:59:05 AM3/23/14
to seleniu...@googlegroups.com
I don't think you quite understand how to work with JVM args do you ?
JVM args are supposed to be name value pairs. 

Eg., -Duser.name=Krishnan

You are missing an equal to symbol !

iSent. iPhone. iReget. iThumbs.iTypos!

Vijay Kumar

unread,
Nov 7, 2014, 4:43:36 AM11/7/14
to seleniu...@googlegroups.com
Hi Guys,

I set the -Dwebdriver.server.session.timeout=0 expecting the session never times out but the session is deleted after 30 min.(refer screeen shot)
Is there any trick where i can keep session always alive.

Regards
Vijay
session timeout details.png

Santiago Suarez Ordoñez

unread,
Apr 23, 2015, 2:56:40 AM4/23/15
to seleniu...@googlegroups.com
Hey Vijay,

I found the following:
https://code.google.com/p/selenium/wiki/RemoteWebDriverServer#Timeouts_%28from_version_2.21%29

But using the -timeout flag for me had no impact either, so at this point I'm at a loss. Here's what I'm using with no success:
java -client -jar selenium-server-2.40.0.jar -port 4443 -avoidProxy -Dwebdriver.ie.driver=IEDriverServer.exe -Dwebdriver.ie.dri ver.logfile=c:\\log\\iedriver.log -Dwebdriver.ie.driver.loglevel=DEBUG -Dwebdriver.server.session.timeout=0 -timeout=0

I'll continue debugging...

Noah Pritikin

unread,
Jun 2, 2015, 12:35:59 AM6/2/15
to seleniu...@googlegroups.com
I found that as well, Santiago.  But alas, using the -timeout or -browserTimeout flags did not change anything that I noticed.

This is the commend I'm using:  java -jar selenium-server-standalone-2.45.0.jar –ensureCleanSession -trustAllSSLCertificates -Dwebdriver.firefox.profile=Selenium -timeout=3600 -browserTimeout=7200

After the webdriver session is stalled for 30minutes it will timeout with the following error message:

09:41:01.915 INFO - Session 3c366b28-a7a4-4f97-805f-2e5fe7b97b21 deleted due to client timeout

Does anyone know why there's no visibility of any timeout values when in debugging mode?  And, more importantly, why the java parameters don't seem to do anything?

Thanks,
Noah
Reply all
Reply to author
Forward
0 new messages