Discover how to fix error 502 bad gateway, include the articles, news, trends, analysis and practical advice about how to fix error 502 bad gateway on alibabacloud.com
likely that one of these websites is faulty or overloaded. Contact the website administrator.
A general explanation of the solution to 502 bad getway errors
1. What is 502 bad getway error?In short, 502 is the
You can try to clear the browser cache access to your FTP to see if you can log in
Successfully resolved 502 Bad Gateway error
Log on Today, show 502 bad Gateway,nginx the most annoyi
tired" php-cgi that is being processed will encounter the 502 Bad gateway error if it encounters a problem.
The following is a more detailed introduction:
Some websites running on Nginx sometimes encounter "502 Bad
processing of the request will appear 504 Gateway time-out this error, and is dealing with the "very tired" of the few php-cgi if encountered problems will appear 502 bad Gateway this error.
The following is a more detailed des
connect to the IP address. Writes an HTTP data stream through this socket. The HTTP data stream that receives the response from your Web server. The data flow includes a state encoding whose value depends on the HTTP protocol. Resolves the data stream to obtain status codes and other useful information.
This error is generated in the last step described above, when the client receives an HTTP status encoding and recognizes it as a '
In the Nginx reverse proxy mode, the page loading is incomplete or the 502 bad gateway appears directly.
There are many cases of 502 bad Gateway, most of which are related to the setting of the Nginx timeout problem. The follo
Some websites that run on Nginx sometimes appear "502 Bad Gateway" errors, even when they occur frequently. The following is a small compilation of some of the Nginx 502 error troubleshooting methods, for reference:The reason for Nginx 5
Some websites running on Nginx sometimes appear as "502 Bad Gateway" errors, some times even frequently. The following is a small compilation of some of the Nginx 502 error troubleshooting Methods for reference:
The reason for the Nginx
502 Bad Gateway error solutionThere are many causes of Nginx 502 errors because of problems with backend servers in proxy mode. These errors are not nginx problems, so you must find the cause from the backend! However, nginx has put all these errors on its own, which makes i
Some websites that run on Nginx sometimes appear "502 Bad Gateway" errors, even when they occur frequently. Here are some of the Nginx 502 error troubleshooting methods compiled from Google for your reference:The reason for Nginx 502
Today, my VPs frequently prompts that the nginx 502 Bad Gateway is incorrect. After the VPs is restarted, it becomes annoying. I cannot figure it out. There was no problem when my website reached 1290 of the traffic in the previous two days. Why did 502 Bad
The first reason: Install LNMP a key installation package when PHP did not install successfully and 502 bad Gateway, starting from 0.9 as long as the installation of success or failure will be prompted. Failure to install the general reason is that before the installation of PHP, some LIB packages in the script may not be installed, causing PHP failed to compile
, find a balance point.
There's also a lazy approach to max_children,
If your PHP is 5.3, then you can set the FPM style to Apache-like, this time the number of children by FPM automatic control. The corresponding configuration parameters are
Start_servers: Number of start processes
Min_spare_servers: Minimum number of processes
Max_spare_servers: Maximum number of processes
When the server is more idle, FPM will take the initiative to kill some redundant children, to save resources, when the se
debug, find a balance point.
There's also a lazy approach to max_children,
If your PHP is 5.3, then you can set the FPM style to Apache-like, at which time the number of children is automatically controlled by FPM. The corresponding configuration parameters are
Start_servers: Number of start processes
Min_spare_servers: Minimum number of processes
Max_spare_servers: Maximum number of processes
When the server is idle, FPM will actively kill some extra children to conserve resources, and the ser
LNMP upgrade php5.4.28 or later version error 502 bad Gateway
Encounter a very strange problem, with LNMP./upgrade_php.sh upgrade php5.4.27 normal.
But upgrade to php5.4.28 error, Access p.php hint: Nginx 502
502 Bad Gateway Causes
A server (not necessarily a Web server) is a gateway or proxy to meet customer requirements, such as a Web browser or our Checkupdown robot, to access the requested URL. This server received an invalid response from an upstream server to fulfill its requirements.
Meaning
This usually does not
Php-cgi supported by php-fpmModify the php-fpm process count in/usr/local/php/etc/php-fpm.conf to find max_children and change the following value to the value you want to set.. The code is as follows:Copy code # Vim/usr/local/php/etc/php-fpm.conf # Max_children indicates the processing process of php-cgi. Setting max_children also needs to be set based on the server performance, increasing the number of processes and occupying memory.It will also increase accordingly. Under normal circumst
Nginx+php-fpm+mysql website, visit Nginx a page, reported 502 Gateway error, generally see this error, can judge is php-fpm problem, not nginx problem. By monitoring the Nginx error log, the following error is found:Upstream sent
The way to resolve 502 Bad Gateway is:
1. Depending on the performance of the server, in the php-fmp.conf to increase the value of Max_children, I currently use 15.
(a php-fpm uses about 20M of RAM, if your memory is about 1G,1024/20=50)
2. Use the reload parameter to reload the PHP-FPM periodically. Release the memory used by PHP-FPM, the PHP script execution
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.