PHP-FPM problems

Source: Internet
Author: User

How to say this question? It was a crash in the heart before I met this problem. Because I have no idea where the problem is. However, in my efforts to explore, eventually solved the problem.

So please keep in mind that persistence does not necessarily succeed, but giving up must fail.

Briefly describe the problem:

1. The local development environment is Nginx+php-fpm+mysql+redis,nginx successfully started, MySQL successfully started, Redis successfully started. In general I am ready to start development, as long as the start of these three items to start development. Because PHP-FPM is automatically turned on by default. So I didn't pay attention to the problem. However, when I started to open My site ready to visit, there will always be Nginx 502 bad Gateaway error.

2. In the heart of the square, do not know what to do. Why does it suddenly not work? Then go online to access a variety of information. Finally, there is no solution. Because my problem description is different from others '. The cause of Nginx 502 bad Gateaway problem but a lot of, everyone's environment is not the same, the problems encountered certainly is not the same, although the manifestation of the problem is the same. So, when we encounter problems, first of all, we have to think about why this problem arises. To find the reason from your own local. Follow the prompts to find the problem in your own program or on the machine.

3. According to the prompt, I looked at the corresponding item error log, according to the description of the log, Google. Then, sure enough, the same problem was encountered.

The above is my log description problem. Under "Kevent () reported that connect () failed (61:connection refused) and connecting to upstream"

Google soon searched for a solution to the crime.

This Bo friend's question is similar to mine: HTTPS://GITHUB.COM/MUSICODE/TEST/ISSUES/5

However, my solution is different from his. He was swapping a port, and I was

Find the 9000 ports occupied
9000 End All Processes killall PHP-PFM restart PHP-PFM

Just OK.

Just a reboot, please.

4. Because it is PHP-FPM because the port is occupied, it causes the website to be inaccessible.

In the case of problems, viewing log records is generally a faster way to find the root cause of the problem.

PHP-FPM problems

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.