Php-fpm always fails

Source: Internet
Author: User
Php-fpm always hangs on a newly created Project & nbsp; switch to an online domain name (a bit of traffic) & nbsp; 502 & nbsp. Log is & nbsp; similar to [error] & nbsp; 3169 #0: & nbsp; * 1 & nbsp; connect () & nbsp; failed & php-fpm always hangs
When a newly created Project is switched to an online domain name (with a relatively high access Volume), 502 of the total traffic is displayed.

Logs are similar

[Error] 3169 #0: * 1 connect () failed (111: Connection refused) while connecting to upstream, client: 127.0.0.1, server: localhost, request: "GET/index. php HTTP/1.1 ", upstream:" fastcgi: // 127.0.0.1: 9000 ", host:" 127.0.0.1"

It seems that fpm is not started at all ..

Debug the SQL statement before (output the SQL statement in the header, and 502 may occur if there is a large amount of data ). Now we have disabled some header output. When the traffic volume is large.
If you change the domain name, there will be no access issues. What is the cause of this situation. Thank you!

------ Solution --------------------
Set worker_rlimit_nofile of nginx to the same value as ulimit-n.

In addition, set the rlimit_files parameter of the php-fpm.conf to the same value as ulimit-n. Then, adjust the process-related parameters based on the server capabilities.

502 is not easy.

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.