Solution 504 Gateway time-out (nginx)

Source: Internet
Author: User

504 Gateway time-out issues common to Web sites that use Nginx as a Web server

I encountered this problem when I had to insert more than 10,000 data.

In general, this situation may be due to the Nginx default fastcgi process response buffer is too small, which will cause the fastcgi process to be suspended, if your fastcgi service is not good for this suspend processing, then it is very likely to cause 504 Gateway Time-out
Now the site, especially some forums have a lot of replies and a lot of content, a page even has hundreds of K
The default fastcgi process response buffer is 8K, we can set the large point
In nginx.conf, join:

Fastcgi_buffers 8 128k

This means that the fastcgi buffer is set to 8x128k
Of course, if you are doing an immediate operation, you may need to make the Nginx timeout parameter larger, for example, set to 60 seconds:

Send_timeout 60;

Solution 504 Gateway time-out (nginx)

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.