Solution
For those of you with gaiad crashing on the too many open files error, here’s a short guide to fix it
check your user’s per-process open file limit
ulimit -Sn
check how many files gaiad has open
ls /proc/(pidof gaiad)/fd/ | wc -l
increase username’s per process limit
sudo vi /etc/security/limits.conf
username soft nofile 2048
From @peng and @zmanian in riot