Skip to main content
Tag

nginx

Fixing “Upstream Prematurely Closed Connection” Error in Nginx

By Quản trị Server, Hosting - Domain, Linux No Comments

I. Introduction Nginx is a popular and widely used open-source web server software. It acts as a reverse proxy server for HTTP, HTTPS, SMTP, and other protocols. However, like any software, Nginx is not immune to errors. One of the most common errors that Nginx users encounter is the “upstream prematurely closed connection” error. In this article, we will discuss…

Read More

Upstream prematurely closed connection while reading response header from upstream

By Linux No Comments

This problem happened because your upstream (php, php-fpm) max_execution_time is shorter than proxy_connect_timeout in your nginx proxy. For example: In my php.ini: But in mysite.conf have: Then I got in error.log of nginx: [error] 117#117: *434 upstream prematurely closed connection while sending to client…. To resolve this problem, increase your max_execution_time to 300. That all! Additional info: https://stackoverflow.com/questions/49508218/upstream-prematurely-closed-connection-while-reading-response-header-from-upstre

Read More