I'm running my Python script with 50 threads, therefore 50 chrome browsers will be open at any given time. The issue is, rarely, an unknown amount of browsers will get stuck - therefore limiting performance. And eventually, after a few hours, all browsers will end up being stuck. By stuck I assume, there has been an unforeseen error therefore the script is at a halt.
I've removed the headless flag and tried to diagnose said problems, but to no avail. Furthermore I've looked into killing threads/browsers which are open for longer than X amount of seconds but I can't seem to find anything simillar topics posted online. I've posted on Fiverr to seek paid help and all 7 people asked have no idea.
Ideally, if anybody knows how to check for browser alive time for each thread, and kill if it exceeds a set amount of seconds - would be greatly appreciated.
Tried:
Contacting people for paid work on Fiverr.
Researching thoroughly on all forum threads.
(I didn't try to write code myself, as I'm inexperienced).