Services frequently reach 499 (Nginx + PHP-fpm). from which aspects should this problem be traced?

Source: Internet
Author: User
Services frequently reach 499 (Nginx + PHP-fpm). from which aspects should this problem be traced? Services frequently reach 499 (Nginx + PHP-fpm). from which aspects should this problem be traced?

Reply content:

Services frequently reach 499 (Nginx + PHP-fpm). from which aspects should this problem be traced?

499The client closed the connection.
Generally, the client closes the connection because it has been waiting for too long. Therefore, it is recommended that you check whether the processing capability of the PHP processing program is sufficient to meet your needs, increase the processing process appropriately, and reduce the waiting time of the client. In addition, it is bestnginxConfiguration inproxy_ignore_client_abort on;To ignore client disconnection requests to avoid exceptions caused by program interruption.
Of course, there may be attacks...

1. the client's request speed is slow. check whether the request speed is really slow through the sample.
2. the machine bandwidth is full and the request is slow.
3. check the nginx timeout time and adjust the time to a longer value. The default value is 60 s.

client_header_timeout 180s;client_body_timeout   180s;


499 corresponds to "client has closed connection ". This is probably because the processing time on the server side is too long and the client is "impatient. To solve this problem, you need to optimize the program. (Similar to 50 * errors)
Rfc2616, 400 ~ The error codes of the 500 error codes are only defined as 417, so 499 should be defined by nginx.

From http://blog.csdn.net/rainday0310/article/details/8166163

1. 499. the client has closed connection indicates that the client actively disconnects the connection. generally, it takes too long for the server to process the connection. if the client cannot wait, it will be disconnected. Another scenario is that an attack deliberately consumes server resources so that the server cannot process the request in time and return the result.

2. Solution: optimize the number of php processes, fastcgi execution timeout, and http forwarding configuration errors to prevent the server from processing http requests for too long.

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.