Skip to content

RFC: chrome: use a dedicated Chrome instance#585

Open
freesteph wants to merge 1 commit into
mainfrom
feat/dedicated-chrome
Open

RFC: chrome: use a dedicated Chrome instance#585
freesteph wants to merge 1 commit into
mainfrom
feat/dedicated-chrome

Conversation

@freesteph

Copy link
Copy Markdown
Collaborator

Du commit:

We've had a long time problem on this project: the complete darkness surrounding the crawling done by Chrome within our processes. That's because we don't provide a browser URL to Ferrum, and so Ferrum boots its own Chrome process within its Ruby process1.

This means we're unable to correctly debug our jobs containers on Scalingo (we can't SH into our running containers, we cannot run ps on them), and that these containers inevitably grow very large because on top of their own overhead (our Ruby/Rails app) they have to allocate and run their own Chrome process which adds a fair amount of memory and CPU to their own.

Demonstrate a new approach here where we run Chrome separately, on a new Docker container we control (on Scalingo we can use a buildpack instead2) and then we just feed to Ferrum our local URL.

This allows us to log, inspect and monitor our Chrome business while keeping our Ruby job containers happy & safe, away from the nightmarish world of web browsers.

@freesteph freesteph force-pushed the feat/dedicated-chrome branch from a2d5bc5 to 82c8065 Compare June 10, 2026 09:37
@freesteph

Copy link
Copy Markdown
Collaborator Author

@Josyann @yann120 effet de bord intéressant : l'erreur de la CI montre que la spec spec/models/checks/run_axe_on_homepage_spec.rb lance un navigateur parce qu'on mock mal le browser, ce qui explique pourquoi elle est particulièrement lente

@freesteph

Copy link
Copy Markdown
Collaborator Author

@Josyann @yann120 effet de bord intéressant : l'erreur de la CI montre que la spec spec/models/checks/run_axe_on_homepage_spec.rb lance un navigateur parce qu'on mock mal le browser, ce qui explique pourquoi elle est particulièrement lente

Pas du tout, au temps pour moi, c'est juste que ça mockait un peu dans le deep des fonctions bien au delà de la classe en question mais il y avait un garde-fou sur Ferrum::Browser qui empêche de lancer un navigateur.

#586

We've had a long time problem on this project: the complete darkness
surrounding the crawling done by Chrome within our processes. That's
because we don't provide a browser URL to Ferrum, and so Ferrum boots
its own Chrome process within its Ruby process[1].

This means we're unable to correctly debug our jobs containers on
Scalingo (we can't SH into our running containers, we cannot run `ps`
on them), and that these containers inevitably grow very large because
on top of their own overhead (our Ruby/Rails app) they have to
allocate and run their own Chrome process which adds a fair amount of
memory and CPU to their own.

Demonstrate a new approach here where we run Chrome separately, on a
new Docker container we control (on Scalingo we can use a buildpack
instead[2]) and then we just feed to Ferrum our local URL.

This allows us to log, inspect and monitor our Chrome business while
keeping our Ruby job containers happy & safe, away from the
nightmarish world of web browsers.

[1]: https://github.com/rubycdp/ferrum/blob/9fae889c724ab4388bee2c5f54a440e0e095b86a/lib/ferrum/browser.rb#L114-L116
[2]: https://github.com/betterplace/scalingo-buildpack-google-chrome
@freesteph freesteph force-pushed the feat/dedicated-chrome branch from 82c8065 to fa573fe Compare June 10, 2026 12:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant