Upstream prematurely closed connection while reading response header

I have been through the linked similar posts on this and nothing there seems to work. This just occurred in the past day or so. None of the config here is exceptional in any way and it used to work just fine. Other php-based services work just fine, with authentication: wordpress and cacti net management. So this is specific to Nextcloud, not my setup/config.

 - installed: true
  - version: 21.0.1.1
  - versionstring: 21.0.1
  - edition: 

nginx version: nginx/1.20.0

PHP 7.4.16 (cli) (built: Apr  1 2021 16:15:31) ( NTS )
Copyright (c) The PHP Group
Zend Engine v3.4.0, Copyright (c) Zend Technologies
    with Zend OPcache v7.4.16, Copyright (c), by Zend Technologies

Now neither the sync client (macOS) or the web login work: both time out or complain:

We have detected multiple invalid login attempts from your IP. Therefore your next login is throttled up to 30 seconds.

Neither my personal or admin accounts work and the admin account is not used to sync, so there should not be “multiple login attempts” there. Not sure these error messages are telling me anything useful.

All the error messages point to PROPFIND /remote.php/webdav/ as the missing piece or whatever. This is mentioned in nginx.conf:
rewrite ^/webdav(.*)$ /remote.php/webdav$1 redirect;

also fails on iOS client.

2021/04/28 11:27:02 [error] 52025#100135: *48 upstream prematurely closed connection while reading response header from upstream, client: 192.168.0.1, server: [REDACTED], request: "GET /ocs/v2.php/cloud/user?format=json HTTP/2.0"

1 Like

Well, no replies here, maybe my query was too vague or too similar to others. I tried rolling back through older versions back to 19 and they all fail to work. It’s not clear what’s wrong but as noted other apps (wordpress, cacti) that use the same infrastructure (nginx, php-fpm) still work and never stopped. Is there a more detailed debugging step I can put in place?