Embarrassed to ask because I have seen the error "Too many open files" for years and just copy the fix from somewhere.
I run ulimit -n and get 1024. What is the thing it limits? Is it files? Network connections? Per user or per process? And why does the fix always mention a different file depending on whether it is a service?