Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Chromedriver out of memory

I recently changed from PhantomJS to Chromedriver. When running chromdriver in Docker, after a while, I get the pod evicted with 'The node was low on resource: nodefs.' and I see using 'kubectl describe nodes' 'OOMKilling' and 'Memory cgroup out of memory: Kill process 452 (chrome) score 1867 or sacrifice child' . So I think this is a memory leak/memory issue. I am running my driver with:

    options = webdriver.ChromeOptions()
    options.add_argument('--disable-extensions')
    options.add_argument('--headless')
    options.add_argument('--disable-gpu')
    options.add_argument('--no-sandbox')
    options.add_argument('--incognito')
    options.add_argument('--disable-application-cache')

Is there anything else that I need to set/do?

like image 696
HeronAlgoSearch Avatar asked Dec 05 '25 19:12

HeronAlgoSearch


1 Answers

Nothing is wrong with the chromedriver. Its the docker instance that ran out of memory.

You need to move your docker instance on a system with more memory

. Other option is to optimize the OOM process killer and fine tune the processes. You can read more about the capacity tuning here.

like image 162
Manmohan_singh Avatar answered Dec 07 '25 16:12

Manmohan_singh