Leaky ChromeDriver Processes #1821
jcanedo279
started this conversation in
General
Replies: 1 comment
-
same issue here.. the current workaround I've got is just a script that monitors system memory usage and restarts my docker container when the memory threshold exceeds 80% |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
This is somewhat of a duplicate of #1613 with added observations. For context I am running UC on Windows 11, other platforms have a different experience, and using Chrome 123.0.6312.105, specifically CfT from https://googlechromelabs.github.io/chrome-for-testing/. On MacOS it seems that leaky processes are much harder to repro, which suggests there's something specific regarding Windows (at least 11) which keeps these processes running.
This comment seems to hit the nail on the head: #1613 (reply in thread), @ongbanbanhbao suggests using the --disable-gpu option which seems to stop the process leak, the only issue being that this is pretty detectable on most sites, likely due to its association with headless browsing. The fact that this only happens on Windows suggests that there is something about the way UC utilizes the gpu (or configures/overrides the Selenium options/driver) which keeps these processes running.
I've tried disabling subprocesses and unsetting no_sandbox but those don't actually seem to stop leaky processes.
Does anyone understand why --disable-gpu is required to stop leaks when closing/quitting drivers? It seems a bit over the top to use the os to kill processes programmatically.
Does anyone know of a workaround which is less detectable?
Beta Was this translation helpful? Give feedback.
All reactions