Are you on shared hosting, or do you have a dedicated server? It isn't related to database connections. It looks like an open file limit on the server itself. Have you asked your hosting provider to look into this for you? What did you increase the open files limit to? Where did you make the change? What is the open files limit currently?
I found an interesting article on this issue here:
https://stackoverflow.com/questions/30023574/how-to-fix-too-many-open-files-error-when-aggregating-billions-of-records
It talks about how to update the limit and check its current value.