Home >Backend Development >PHP Tutorial >504 Gateway Time-out

504 Gateway Time-out

WBOY
WBOYOriginal
2016-07-29 09:04:352129browse

The project was almost developed. When deployed to the production environment, a synchronized fan function reported an error.

There is no problem when the number of fans is only a few dozen, but when testing a public account with 5,000 fans, the following error occurs. Proxy_read_timeout 1 800;

Decisively change the time configuration to half an hour, but The problem still exists. I checked online and found that the cache of the process may be too small. Modify and then lower the cache size. 504 Gateway Time-out

The default fastcgi process response buffer is 8K, we can set it larger. In nginx.conf, add: fastcgi_buffers 8 128k, which means setting the fastcgi buffer to 8 blocks of 128k space.

It is true that some public accounts can be modified in this way, but what about the public accounts with more fans? You can't always modify the server configuration.



 And pay attention to the next blog, the use of anonymous threads

The above has introduced 504 Gateway Time-out, including the relevant content. I hope it will be helpful to friends who are interested in PHP tutorials.

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn