• If you are still using CentOS 7.9, it's time to convert to Alma 8 with the free centos2alma tool by Plesk or Plesk Migrator. Please let us know your experiences or concerns in this thread:
    CentOS2Alma discussion

NGINX Too Many files open

smithxx

New Pleskian
I am having some problems with my server. I saw a spike in traffic today due to an event-related web site and I saw several problems:

-I got alerts from Health Monitoring that says "Apache CPU usage" is red. it is around 27%. 27% of CPU usage does not seem that high. Also, the total CPU usage never goes above 15%. Even if the 27% was high why would more CPU resources be allocated to Apache? is there a way to do that?

-Users started seeing (intermittently) 500 internal server error - nginx. The nginx error logs shows this "too many files open" entry that is discussed in several other threads. I saw some solutions that discussed raising some limits in the nginx config file. Is this the way to go?

-For now I turned off nginx. Can it be left off permanently? What benefits does it give being turned on? More security?

I also noticed the memory usage goes up steadily but slowly. I have a lot of memory so it doesn't get anywhere near the max but it seems to a symptom of some other problem and I suspect it may be related to the nginx issues.
 
Apache CPU - health monitor has it's default configuration, so if you think this percentages are too low and should be higher, you can always download configuration file and set the numbers you like/want:

Home -> Health Monitoring -> Download Configuration File -> edit numbers you want, save file and upload configuration file.

I don't know if you were upgrading plesk or it's clean installation of 11.0.9., but in my case, I did Plesk upgrade from 10.4.4. to 11.0.9. on May 2012, and still now, my nginx is still not fixed. I've tryed many things but with no success, Plesk Support team also tryed but nothing. This is known problem and as far as i know, no official fix was announced lately (there is some KB article to remove one package, but this is not fixing the problem). So yes, when there was too many process or what ever happened i already forgot (few months before), there was NGINX wrong gateway default page on every single domain on server and since I have many clients on server, i couldn't accept for this to happen again, so i turned off NGINX and it's turned off already for months, and guess what? Everything is working smooth and clear, I've tunned mysql/apache/fcgi configuration and everything is working just fine.

Yes, you can turn off NGINX, nothing will happen, nginx is good to have, it can save requests and other things, but default settings/configuration will not be good for you if server is big/many clients/domains. You have to change/tunne this settings as well.
 
Back
Top