Bad mud: nginx load balancing, bad mud nginx Load Balancing
This article was sponsored by Xiuyi linfeng and first launched in the dark world.
Today, we will learn about nginx Server Load balancer configuration. Nginx Server Load
/1.1proxyMUSTensurethatanyrequest Messageitforwardsdoescontainanappropriatehostheaderfield thatidentifiestheservicebeingrequestedbytheproxy. allinternet-basedhttp/1.1serversmustrespondwitha400 (Bad request) statuscodetoanyHTTP/1.1requestmessagewhich Lacksahostheaderfield. Above is an explanation of http1.1 's RfC about the host section, from the above we learned that if a http1.1
SceneBusiness Services provide WebSocket services based on WebSocket to push report data, clients view reports on browsers, and pass requests to backend services via HTTP proxies.ProblemWhen the client views the report data on the browser, the report function is abnormal, and the browser development tool views The WebSocket handshake on the service side and rejects it, returning to the bad request.Analysis4,001 is due to the client, so it should be a
connections. This technology is called pre-connection "pre-connection ".
Generally, when we access a website, the first one gets an HTML main file, which links the CSS, JS, images, and other media resource files required by the webpage, generally, resource files and primary HTML files are stored in the same domain. A pre-connection Establishes Many TCP connections before obtaining HTML, instead of waiting until the HTML file is obtained, connect to the server to obtain other files. Because it t
HTTP 400 error is sometimes reported when Ajax requests background data-the request is invalid (bad requests), the request is invalid, the request does not enter the background service;Cause: 1) The field name of the front-end submission data is inconsistent with the field t
There is a page under a non-CDN domain name and you need to request resources under the CDN domain name. So I set up the Nginx on the source station of the CDN.
Add_header ' access-control-allow-headers ' X-requested-with 'Add_header ' Access-control-allow-methods ' get,post,optionsAdd_header ' Access-control-allow-origin ' xx.com '
The page also requests a. Do interface, which is deployed under ano
Recently, server downtime occurs frequently. When I get off work, G crashes and 502 Bad Gateway Nginx reminds me of the previous 504 Gateway Time-out, the two should be in a certain relationship. Nginx 504 Gateway Time-out means that the requested Gateway does not have a request. Simply put, it does not have a
Cause
Today, a garden friend reported to us that some blog articles opened in chrome will contain "Bad request-request too long. HTTP Error 400. the size of the request headers is too long. "error page:
It's okay to use IE and Firefox, but Chrome is the only one.
We have en
Recently, the phenomenon of server downtime more frequent, temporary work, G to hang up, 502 Bad Gateway Nginx, I can not help but remind me before the 504 gateway time-out, the two should be a bit of contact, we must find out. The implication of Nginx 504 Gateway time-out is that the requested gateway is not requested, simply that there is no
Using the ABP framework, the zero module is used. Then use the element UI to upload the image. A "Request for error" occurred.It works correctly when transmitting data to an interface using Postman.After several twists and turns, finally found the problem is Nati token problem. https://forum.aspnetboilerplate.com/viewtopic.php?f=5t=10025sid=5b3ace20a25195168c29846975df630dBecause the element UI is not part of the ABP. The AJAX
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 502 error is more because of a problem with the backend server in proxy mode. These
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 error is more due to a problem with the backend server in Agent mode. These er
Bad Gateway keeps appearing when the Forum uploads images or executes scripts for a long time, most of them are the solution of Master Zhang. His solution is
1
http
2
{
3
fastcgi_connect_timeout 300;
4
fastcgi_send_timeout 300;
5
fastcgi_read_timeout 300;
6
}
Added the request time for FastCGI. How
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 error is more because of a problem with the backend server in proxy mode. These errors
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 it highly questionable for
this time, Nginx cannot transfer the PHP file to PHP-FPM processing, so the CPU will be reduced to very low (not to handle PHP, not to execute SQL), and the load will rise to very high (close and open children, nginx wait php-fpm), the network card traffic is also reduced to very low ( Nginx cannot generate data transfer to client)Solving the problem is simple,
README directly. As a result, the 502 bad gateway error was caused.
The HTTP status code with 5 headers is caused by the server, so check the nginx log:
Error log:
See upstream: "fastcgi: // 127.0.0.1: 9090". Here, the port seems to be incorrect, so check the configuration of the VM:
Let's take a look at the configuration of php-fpm:
Indeed, the FastCGI server listening port specified by the
Yesterday we handled the 500 error in Google Webmaster and handled some 400 processing today, such as the following URL at the End of tab (tab):http://www.cnblogs.com/me-sa/archive/2008/05/16/1200329.html%09http://www.cnblogs.com/JimmyZhang/archive/ 2007/12/20/1006555.html%09 ...When these URLs are accessed, IIS returns the error of the "Bad Request":
Yesterday's own machine old tips 502 Bad Gateway error, the following small series to give you a summary of the Nginx appeared 502 the solution, the wrong gateway, have encountered such problems of friends can refer.Cause of Occurrence1, PHP fastcgi process number is not enoughThe number of PHP fastcgi processes is not guaranteed when there is a huge amount of concurrent access to the site, because CGI is a
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.