Chrome is heavy, especially when running multiple Selenium instances. On low-RAM Ubuntu VDS setups, a few optimizations can make a big difference:
- Run Chrome in headless mode (new headless is much lighter).
- Disable GPU with --disable-gpu.
- Disable images and unnecessary features (extensions, dev tools, etc.).
- Use --no-sandbox and --disable-dev-shm-usage on small VPS setups.
- Lower the shared memory usage or increase swap if possible.
You could also test
Chromium instead of full Chrome, or even Firefox with Geckodriver, sometimes it behaves better under constrained RAM.
If you’re running many sessions at once, consider limiting concurrency or using lightweight containers to isolate and control memory usage.