RFC: chrome: use a dedicated Chrome instance#585
Open
freesteph wants to merge 1 commit into
Open
Conversation
a2d5bc5 to
82c8065
Compare
Collaborator
Author
Collaborator
Author
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 |
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
82c8065 to
fa573fe
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Du commit: