Ngnix timeout problem

WBOY
Release: 2016-08-08 09:32:56
Original
1124 people have browsed it

I have been using apache for a long time, and I heard that nginx has excellent performance, so I decided to use nginx instead of apache in the project, and nginx can be installed without any installation requirements.

However, I found some problems when using nginx. First, files cannot be uploaded if they exceed a certain size. After checking the data in the background, I found that there is a default file size for uploading, and the nginx parameters need to be adjusted.

Later, I discovered that an operation that took a long time to execute was thrown without waiting for the result to be returned. I immediately thought it was a timeout problem and checked nginx.conf.

have inside:

#keepalive_timeout 0;
keepalive_timeout 65;

Changing to keepalive_timeout 300; (5 minutes) does not work,

Later it was changed to the following:

#keepalive_timeout 0;
#keepalive_timeout 65;
keepalive_timeout 300;
send_timeout 300;
proxy_read_timeout 300;

The result is ready for use.

The above has introduced the timeout problem of Ngnix, including aspects of it. I hope it will be helpful to friends who are interested in PHP tutorials.

Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!