Nginx HTTP 500 Error Analysis and resolution method

Source: Internet
Author: User

The scene appears:  In the use of Nginx load balancer server to do concurrency test, the concurrency ratio is large, nginx will report an HTTP 500 error   cause of error:When there is a large amount of traffic, you cannot open too many files due to system resource constraints Reason lookup:
    • Open Nginx error log (/usr/local/nginx/logs/error.log)
    • See if you are reporting too many open files error
Error Resolution:
    • Open/etc/security/limits.conf

    • Modify the limits.conf file, plus the following two sentences
* Soft Nofile 65535 * Hard Nofile 65535
    • Open/usr/local/nginx/conf/nginx.conf, add a line of configuration under Worker_processes
worker_rlimit_nofile 65535;
    • Restart Nginx, problem solving

Nginx HTTP 500 Error Analysis and resolution method

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.