Nginx 502 Bad Gateway solution when a large number of fields are post

Source: Internet
Author: User
Tags fpm

Today, I encountered a strange problem. When I submitted the form, the 502 Bad Gateway error occurred! I started to suspect that it was a program Problem. Later I checked that the program was normal and found that when the number of post fields was greater than 1000, 502 Bad Gateway would appear, but it would be normal if the number of post fields was not greater than 1000. Google went down. I found that

In php. ini, the configuration item max_input_vars is disabled by default. The default value is 1000. Therefore, you can modify max_input_vars to suit your needs.

Restart php after modification

Service php-fpm stop


Service php-fpm start

It is normal to submit OK again.

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.