Nginx warning - upstream sent more data.
nginx-forum at forum.nginx.org
Sat Apr 17 15:59:13 UTC 2021
I have a bunch of Nginx + PHP8.0-fpm installed in the north. When crawlers
visit a page and the request contains the If-Modified-Since header, but the
page has not changed, the site returns the "304 Not Modified" header. If the
request protocol is HTTP / 2.0, everything works correctly, but if the
request protocol is HTTP / 1.1, a warning appears in the Nginx logs:
[warn] 910 # 910: * 21961 upstream sent more data than specified in
"Content-Length" header while reading upstream, client: 220.127.116.11,
server: site.com, request: "GET /category/page-title.html HTTP / 1.1 ",
upstream:" fastcgi: // unix: /var/www/php-fpm/12345.sock: ",
The site engine does not give Nginx the Content-Length header for sure and
there is no content. I tested this by making requests to the site with the
If-Modified-Since header via CURL.
Why is Nginx showing this warning? Is this an Nginx bug?
Posted at Nginx Forum: https://forum.nginx.org/read.php?2,291303,291303#msg-291303
More information about the nginx