-
-
Notifications
You must be signed in to change notification settings - Fork 8.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[🚀 Feature]: Configurable HTTP Client settings across bindings #12368
Comments
@christian-bromann does JS itself have defaults here, or did you completely add these? |
We are using a request library which I believe has some defaults in that regards. These particular timeouts are set by me. If you have better suggestions for them, let me know. |
The tests I did, I couldn't get JS to time out, and I gave up after a bit. @AutomatedTester do you and/or your team know, and/or does Nightwatch configure these differently? And yeah, I put my recommendations on the bottom, which is for Selenium to match WDIO on Read Timeout, and standardize max redirects to 20. And make everything configurable. Changing default Page Load Timeout is a more controversial suggestion, but the current value is useless for most people. 😆 |
@jimevans @harsha509 @AutomatedTester @diemol |
I just updated the table above. Java's default read timeout is 180 seconds, not 200. |
👍 |
@diemol I'm not sure we're looking in the same place. I ran tests timing it as part of my investigation. Either way if we go this route, we'll make sure it is changed properly. |
And yet it doesn't time out until 200 seconds, so something more is happening. I didn't look too deeply into it, but that number isn't the whole story. |
@titusfortner Your table is incorrect. The timeout for the HTTP client in the .NET bindings is entirely configurable. Every concrete driver class ( |
Yeah, I smooshed both of those into the same column (are both of these values configurable). I spent time in several of the bindings when working on this... I think I saw where it would get changed in .NET but now I'm not sure if my memory is playing tricks on me. 😂 |
@titusfortner Actually, yes, the max redirects would be set during the creation of the |
Yes, that looks like what I saw. What Java has done, which I like, is create a ClientConfig class that manages things like connection timeout, read timeout, proxies, max redirects, etc. It would be nice to have a similar interface across the bindings (or at least equivalent functionality). The general idea is that Options class has session related things, Service class has driver related things and ClientConfig class has connection related things. I don't want to see the driver constructors blow up. 😄 |
Configured through our config file |
@AutomatedTester does it do it in a way that we can apply to SeleniumJS, or is it something that needs to be subclassed/?? |
We decided to do this, now we just need to do this. |
As mentioned in #12975, it might be good to have a default value which will not conflict with the default w3c page load timeout of 300s. Otherwise there are situations like #13251 even when using the default configuration. And in general the timeouts of the different grid compoments should be aligned, otherwise the client will timeout with a none speaking message, some ms before the driver would respond with a propably more speaking error message. So in my mind this makes sense to have these conditions for the timeouts (> is 'must be bigger than'):
|
@joerg1985 what are the current values of:
and by
Do you mean more than just page load timeout? |
@titusfortner i was not sure if there where more/higher w3c timeouts, but it seems like the page load is the highest one:
The current defaults are:
So the current timeouts might lead to issues when the client has to wait for new session until the grid has a free slot. |
Is it good idea to set the default value for the http client timeout lower than the sessionRequestTimeout (==300sec)? |
Agreed, the settings should work together better. If we move to 120 second Read timeout, we should set things like page load timeout and session request timeout to 115 so they hit first. Can even provide more information about how to change settings if it is a Selenium error and not an http client error |
Status
Python: #13286 (partial)
Java:
Ruby:
JS:
.NET:
Feature and motivation
Update: Here's the example page describing client settings and what all examples need to be added and what features still need to be implemented: WIP - HTTP Client Documentation
I went down a rabbit hole of timeout settings in Selenium between the different bindings, and what the defaults are and what can be configured. Edit: added WebDriverIO for reference
According to Jari, Max Redirect should be 20.(93eee69)
It is also problematic that the default page load timeout is 300 when the read timeout in most languages is so much less (the driver will wait for the page long after the code errors and can't send a quit command). I'm not sure why it was set that high in the first place? I think we should change the defaults across the board to be 120 second read timeout and 115 second page load timeout.
Usage example
The text was updated successfully, but these errors were encountered: