Interview The reason and solution of Nginx status code 499

Source: Internet
Author: User

http://www.lc365.net/blog/b/23997/

499 is a nginx custom state code, which has an explanation of this status code in the Src/http/ngx_http_special_response.c file.

494: The request head is too big

495:HTTPS Certificate Error

496:https No certificate

497:http to HTTPS

498: Cancel

499: The client closes the link (server-side processing time is too long, the client "impatient", disconnected the link. )

Common cases where the 499 error occurred:

1, it is true that the client shut down the connection, or the connection timeout, no matter how many times you set the timeout is not the original PHP process is not enough (the default test environment to open 5 sub processes)

Solution: Improve the number of PHP processes, problem solving.

2, Nginx to a never open back-end, client request timeout, active disconnect, log status record is 499, the number of bytes sent is 0.

FIX: Replace the back end that can be opened

3, open Nginx Access.log found in the last commit is the HTTP1.1499 0-such errors, but the use of Port +ip direct access to the backend server does not exist, later test Nginx found that if two submitted post too fast will appear 499 , it appears that Nginx is considered an unsafe connection and actively rejects the client's connection.

Proxy_ignore_client_abort on;

Don ' t know if this is safe.

That is, to configure the parameter proxy_ignore_client_abort on, which means that the proxy server does not primarily actively shut down client connections. With this configuration restart Nginx, the problem is solved. It's just a little bit less secure, but it's much better than always appearing to be unable to find a server.

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.