Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add restart time for leaking Chromium in Ubuntu #1880

Merged
merged 4 commits into from Feb 7, 2021
Merged

Conversation

Fmstrat
Copy link
Contributor

@Fmstrat Fmstrat commented Feb 4, 2021

Description

In Ubuntu, when attempting to check frequently and as Chromium tabs grow and usage increases over time, memory management suffers and machines will lock up (tested across multiple PCs, and happens in other heavy-use Puppeteer applications as well). While niceing helps, it does not fully solve the problem.

This PR adds a RESTART_TIME flag that takes an integer in ms to set when streetmerchant will restart Chrome, thus resetting memory usage.

Testing

  • Set up a machine with 4-8GB RAM running Ubuntu 20.04
  • Use streetmerchant as default checking all sites
  • Let run overnight
  • Wait for lockup or reboot

NOTE: Wiki updates required after PR. Happy to do this as well.

@Fmstrat Fmstrat requested a review from jef as a code owner February 4, 2021 13:43
@Fmstrat
Copy link
Contributor Author

Fmstrat commented Feb 4, 2021

I realized after the fact that the documentation was actually in the repo, so I've added that to the PR.

Copy link
Owner

@jef jef left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This makes a lot of sense to have in the meantime. I really appreciate your help here! 🚀

@jef jef merged commit 1009ce6 into jef:main Feb 7, 2021
erwinc1 pushed a commit to erwinc1/streetmerchant that referenced this pull request Mar 31, 2021
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.

None yet

2 participants