Tuesday, July 14, 2015

Fix Google Chrome Crashes by Increasing Open Files Limit in Linux Mint

I found myself frequently having Google Chrome crash when opening many tabs across several windows (don't judge me) on my Linux Mint 17 Cinnamon desktop.

Upon further investigation, I found that Chrome was throwing some error about too many open files.
 ~ tail -f ~/.xsession-errors 
The error, I can't remember, but was something in shared_memory_posix about /dev/shm/.com.google.Chrome and Too many open files.

If you look at the configured default open limit, it's very low (like 1024).
~ ulimit -n
The fix (so far, so good) seems to be editing /etc/security/limits.conf and adding the following line at the end of the file:
* hard nofile 65535
* soft nofile 65535
Reboot the machine, and should be all good.

Note: I saw several people modifying their fs.file-max settings, but that made Cinnamon not even want to load and played hardcore shenanigans with my machine, overall.