-
-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
[🐛 Bug]: Enabling new jdk-http-client leads to 'java.io.IOException: Too many open files' and ' Unable to find a free port' #11826
Comments
@EuclidHeron, 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! |
Problem still occurs on Selenium 4.9.0 and 4.9.1 |
Hi @titusfortner , I see you added the [C-java] label to this, is that because it is due to the underlying implementation of a C-library? Or something else? |
All the language tags are prepended with "C-" so they show up in the same place in the drop down. So, it's just a Java tag, and I have no idea why we picked the letter C. |
@titusfortner thank you for your fast response! Quick follow up - is there a way to keep this on the bug radar? Just so that it does not fall through the cracks. As @bykes shows above this issue still exists as of 4.9.1, hence my ask. Is there any other information/way that we can assist? |
I'm getting this bug in 4.10.0 as well still. Any chance of an update or workaround for this? I need my scrapers to run for weeks unfortunately and it seems to last only ~12 hours. |
@titusfortner is there a way to create a bug bounty (monetary or otherwise) for this? Do we have a procedure for that? |
Thank you so much @diemol ! |
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
What happened?
When enabling the new jdk-http-client client leads to leaking resources and eventually resulting in 'java.io.IOException: Too many open files' and ' Unable to find a free port' after while. This does not occur if I disable 'System.setProperty("webdriver.http.factory", "jdk-http-client");', the legacy client does not exhibit this behavior (we have run it for many many hours without seeing this once). Therefore, I think the new driver has a resource leak of some type - both related to open files and due to ports.
How can we reproduce the issue?
The easiest way to see this is to run selenium (see below for the details fo how I am running it) and enable the new client in a docker container (see below). Then go and run selenium many times. Use the command 'docker container stats' and monitor the PIDS from that command. Even when including the --init flag in docker run (do 'docker run --init ...') the PIDS grows without limit. This caused by the resource leak, leading to files not being closes (which is why we get 'java.io.IOException: Too many open files' ) and, since selenium tried to get a free port ' Unable to find a free port' due to the ports being exhausted.
The text was updated successfully, but these errors were encountered: