Home  >  Article  >  Operation and Maintenance  >  What does nginx error mean?

What does nginx error mean?

藏色散人
藏色散人Original
2019-08-08 09:32:1015513browse

What does nginx error mean?

What does nginx error mean?

nginx error means that there is an error in the Nginx server. We can check the cause of the nginx error by checking the Nginx log file.

To solve this problem, there are two main methods:

Method 1 (permanent adjustment):

vi /etc/security/limits.conf

in the file Add at the end: * soft nofile 8192 * hard nofile 20480, and add fs.file-max=8192 at the end of vi /etc/sysctl.conf, and then restart. The number viewed using ulimit -n is already 8192.

Method 2 (temporary use):

First, enter ulimit -n 8192 directly in the terminal, and then press Enter.

Error error supplement:

1. The hard disk space is full. Use df -k and check whether the hard disk space is full. Clearing up hard drive space can resolve 500 errors. If the access log is enabled in nginx, it is best to close the access log when it is not needed. The access log takes up a lot of hard disk space.

2. nginx configuration file error. This does not refer to syntax errors. If nginx has a syntax error in the configuration file, it will prompt it when it is started. When configuring rewrite, 500 errors may occur if some rules are not handled properly. Please check your rewrite rules carefully. If some variables in the configuration file are set improperly, a 500 error will also occur, such as referencing a variable with no value.

3. If none of the above problems exist, it may be that the number of simulated concurrencies is too much, and you need to adjust the number of concurrency settings in nginx.conf

For more Nginx related technical articles, please visit Nginx usage tutorial column to learn!

The above is the detailed content of What does nginx error mean?. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn