我可以通过Selenium WebDriver启动多少个同时进行的Chrome连接/线程的最大数量? [英] How many maximum number of simultaneous Chrome connections/threads I can start through Selenium WebDriver?

查看:1368
本文介绍了我可以通过Selenium WebDriver启动多少个同时进行的Chrome连接/线程的最大数量?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

假设我没有Grid设置,我可以从Selenium WebDriver中启动的最大并发Chrome线程数量是多少?



是5吗?而且对Chrome Headless也适用吗?

解决方案

浏览器连接限制



浏览器限制HTTP连接的数量具有相同的域名。此限制在HTTP规范(






http.maxConnections



按照网络属性

  http.maxConnections(默认值:5)

如果启用了HTTP keepalive(请参见上文),此值将确定每个同时保持活动状态的空闲连接的最大数量。






每个主机的连接



按< a href = http://kb.mozillazine.org/Network.http.max-connections-per-server rel = noreferrer> Network.http.max-connection s-per-server Firefox 3 已将每个主机的连接数提高到15。



根据匹配Firefox的每主机连接限制为15 。Chrome小组尝试匹配该限制,并进行了讨论可配置的每主机连接数,但最终在每个主机可配置的连接






结论



使用任何 WebDriver Web Browser 变体组合时,相同的标准也适用。 Selenium Grid Setup Chrome Headless Firefox Headless 的行为也将相同。






参考




Assuming I do not have a Grid setup, what is the Maximum number of simultaneous Chrome threads I can start from Selenium WebDriver?

Is it 5? And does it hold good for Chrome Headless as well?

解决方案

Browser connection limitations

Browsers limit the number of HTTP connections with the same domain name. This restriction is defined in the HTTP specification (RFC2616). Most modern browsers allow six connections per domain where as most of the older browsers allow only two connections per domain.

The HTTP 1.1 protocol states that single-user clients should not maintain more than two connections with any server or proxy. This is the reason for browser limits. You can find a detailed discussion in RFC 2616 – Hypertext Transfer Protocol, section 8 – Connections.

Modern browsers are less restrictive than this, allowing a larger number of connections. The RFC does not specify how to prevent the limit being exceeded. Either connections can be blocked from opening or existing connections can be closed.

Table of MAXIMUM SUPPORTED CONNECTIONS:


http.maxConnections

As per Networking Properties:

http.maxConnections (default: 5)

If HTTP keepalive is enabled (see above) this value determines the maximum number of idle connections that will be simultaneously kept alive, per destination.


Connection per-host

As per Network.http.max-connections-per-server Firefox 3 has boosted the connections per host to 15.

As per Match Firefox's per-host connection limit of 15 Chrome team tried to match the same and went through the discussion Configurable connections-per-host but ended up without any conclusion in Configurable connections-per-host


Conclusion

The same standards are also applicable while you use any of the WebDriver and Web Browser variant combo. The behavior with Selenium Grid Setup, Chrome Headless and Firefox Headless will also be identical.


References

这篇关于我可以通过Selenium WebDriver启动多少个同时进行的Chrome连接/线程的最大数量?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆