-
-
Notifications
You must be signed in to change notification settings - Fork 8.5k
[🐛 Bug]: Facing "Unable to find session with id" errors during initial executions of the test in the Selenium grid #15347
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
Comments
@rookieInTraining, thank you for creating this issue. We will troubleshoot it as soon as we can. Info for maintainersTriage this issue by using labels.
If information is missing, add a helpful comment and then
If the issue is a question, add the
If the issue is valid but there is no time to troubleshoot it, consider adding the
If the issue requires changes or fixes from an external project (e.g., ChromeDriver, GeckoDriver, MSEdgeDriver, W3C),
add the applicable
After troubleshooting the issue, please add the Thank you! |
|
Btw, in PR #15348, traces data for session stop is added. So, we can track the session was cloded due to timed out or not. |
@rookieInTraining i think your framework code is broken, this might be the root cause.
|
@joerg1985 , the reason I'm not clearing the threadlocals is in order to re-use the same browser session in my test suite. I basically am creating a pool of browsers which I can leverage for the lifetime of my test suite. I've been logging the threads which these sessions are being called from, have not seen any issues you've mentioned but I'll definitely take a look at your feedback. @VietND96 - is there a possibility to test this out via a nightly build? |
@VietND96 after reading the javadoc of CacheBuilder i have a bad feeling about the cache it self: The prologue ends with: |
Do you think something in LocalNode, where drain event is fired? I saw in the drain node when the session configured reach, there are |
I also just walked through a few examples where migrating from Guava to Caffeine (e.g https://opendev.org/opendev/gerrit/commit/06c86046fefc6555b98d81f3726dd664020aeb28). Do you want to make this transition in part of #12737? |
I think it might be best to move to Caffeine, as the Guava Cache has 17 unfixed issues, 6 date back to 2014. |
@joerg1985, the intermittent issue we are discussing in #15370 looks like it appeared from 4.28.0. |
One question here @VietND96 @joerg1985 . If the issue is occurring due to the local cache implemented in grid. Does an external caching system like Redis be used to help mitigate this problem? |
Ok, after much research and uncoutable coffee nights. I've figured this issue out. Turns out that the GCP cluster in use had an additional cluster auto-scaling rule which was scaling down the new nodes that were spun (it was considering that node to be under-utilized). I had to mark the Closing this issue with this comment for other facing a similar issue to relook at the setup. Apologies for any inconvenience caused. |
This issue has been automatically locked since there has not been any recent activity since it was closed. Please open a new issue for related bugs. |
Uh oh!
There was an error while loading. Please reload this page.
What happened?
Hi team! I've been debugging a probable issue with my selenium grid setup. A couple of seconds/minutes into my tests I face a lot of "Unable to find session with ID" exceptions and a large chunk of my test suite fails. The behaviour looks similar to the comment mentioned here just that in my case, since the grid is dynamic is could be an event where the node is initialized.
The configurations that I'm using for the hub:
Any pointers to debug this issue further would help.
How can we reproduce the issue?
Relevant log output
Operating System
Linux (Docker)
Selenium version
4.28.1
What are the browser(s) and version(s) where you see this issue?
Chrome
What are the browser driver(s) and version(s) where you see this issue?
132.0.6834.159
Are you using Selenium Grid?
4.28.1
The text was updated successfully, but these errors were encountered: