TOO many files open then 502 badgate nginx

hello everyone,
We have a live instance version 2.34.2 , and we are using it every day but suddenly we got an error of “fileNOtfoundEXception://usr/local/tomcat-main/webapps/ROOT/web-info/lib/spring-data-kayvalue-2.2.0.RELEASE.jar (Too many files open)” then after we used sudo killall java to kill process and then started tomcat. but unfortunately the server starts but we still get 502 BADGATEWAY nginx
Help please





Hi,
Did you try to restart? Did you always use the command ‘sudo -u dhis2’ to startup? Because if you ever use ‘sudo ./startup.sh’ (which is not recommended security wise) then it could be the reason causing this problem.
Are you sure you have used “chown -R dhis:dhis”? Thanks!