Problems with selenium closing chrome browser

use selenium, multithreading for Java to crawl, and each thread opens a chrome browser;
each thread quit exits;
crawls for a few days and finds a pile of unclosed threads in the background; memory explodes directly


you can send a special identity on the command line when you start chrome, for example, before the threadId, thread exits, use the wmic command to find the process PID, according to the identity and taskkill-f-pid xxx to kill it.
in addition, there is no need to launch a separate browser for each thread, you can use no trace mode

Menu