In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-06 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/02 Report--
Nginx hint: 500Internal Server Error error resolution
Foreword:
Today, I found that the website could not upload resources and post articles. Check the returned information of the server through the browser.
500 Internal Server Error
At first, I thought it was an application server or program exception. I checked their logs. There was no request record, and this type of exception was not thrown in the program code, so I can find the reason from the server or Nginx.
1. Is there insufficient disk space?
Use df-k to see if the hard drive is full. 500 errors can be solved by cleaning up hard disk space. Nginx if access log is enabled, it is best to turn off access log if it is not needed. Access log takes up a lot of hard disk space.
2. Nginx configuration file error?
This does not mean syntax errors. Nginx will prompt when it starts if there is a syntax error in the configuration file. When configuring rewrite, some rules will cause 500 errors if they are not handled properly. Please check your rewrite rules carefully. If some variables in the configuration file are not set properly, there will also be a 500 error, such as referencing a variable with no value.
3. If none of the above problems exist, it may be that the number of concurrency in the simulation is too large, so you need to adjust the number of concurrency settings in nginx.conf.
The solution is:
1. Open the / etc/security/limits.conf file and add two sentences
* soft nofile 65535 * hard nofile 65535
two。 Open / etc/nginx/nginx.conf and add a line under worker_processes
Worker_rlimit_nofile 65535
Restart nginx and reload settings
Kill-9 `ps-ef | grep php | grep-v grep | awk'{print $2}'`/ usr/bin/spawn-fcgi-a 127.0.0.1-p 9000-C 100-u www-data-f / usr/bin/php-cgi killall-HUP nginx
After rebooting, look at the error log of nginx to see if there are any errors reported.
Summary
When I found a problem, instead of going to google or Baidu, I directly logged on to the remote server to troubleshoot the problem. It took me nearly an hour to find out and solve the problem, wasting a lot of time, which reminds me of a classic saying: programmers make mistakes not because they don't understand, but because they think they know why.
The above is to solve the nginx hint: 500Internal Server Error problem, if you have any questions, please leave a message or go to the community to exchange and discuss, thank you for reading, hope to help you, thank you for your support!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 264
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.