Nginx 500 (Internal Server Error) : the 500 Error refers to an Internal Server Error, where the Server encounters an unexpected condition and cannot fulfill the request.
There are several types of errors:
1. Web script errors, such as PHP syntax errors, Lua syntax errors, etc.
2. In case of heavy traffic, too many files cannot be opened due to system resource limitation
General analysis ideas:
(1) Check nginx error log, check PHP error log
(2) if it is too many open files, modify the nginx worker_rlimit_nofile parameters, using the ulimit view limit system to open the file, modify the/etc/security/limits. Conf
(3) If the problem is the script, you need to fix the script error and optimize the code
(4) If too many open files still appear after all kinds of optimization, it is necessary to consider load balancing and distribute the traffic to different servers.