we are using Ferrum 0.13 version in our Ruby on Rails app to call HTML pages and create a screenshot of the page. However it seems that this creates quite some never ending Chrome processes.
The never ending chrome processes do sum up and over time eats up all the memory in our Kubernetes Containers/Pods. This is causing Kubernetes to restart the container after some time.
We can measure the amount of chrome processes that are running longer then one hour on one host with this command:
Now the question is why do these processes be there forever when they should end in less then one second usually? At least until the container is killed due to the memory limits that are set? Can this somehow be debugged?
You better start one browser, and create pages in the new context, that you can dispose after job is done. Check the docs for create_page and new context option, try this approach and let me know if it’s any better
Hi there,
we are using Ferrum
0.13
version in our Ruby on Rails app to call HTML pages and create a screenshot of the page. However it seems that this creates quite some never ending Chrome processes.The never ending chrome processes do sum up and over time eats up all the memory in our Kubernetes Containers/Pods. This is causing Kubernetes to restart the container after some time.
We can measure the amount of chrome processes that are running longer then one hour on one host with this command:
Now the question is why do these processes be there forever when they should end in less then one second usually? At least until the container is killed due to the memory limits that are set? Can this somehow be debugged?
These are the only options that we set:
after screenshot was done we also quit the browser like:
browser.quit
Ideas are very welcome! Thank you in advance!