All uploads (web & sync) shows error

Nextcloud version: 22.2.0
Operating system and version: Debian 10 (x64)
Apache or nginx version: Apache/2.4.38 (Debian)
PHP version: 8.0.11

The issue you are facing:

All files uploaded via web or client sync freezes at 100% for about 30sec before showing an “unknown error” (Android: error occured while waiting for the server).

However, the file is actually uploaded and locked for a bit (after a while, file gets unlocked and shows normally in Nextcloud as if nothing happened).

It becomes a bigger problem when uploading multiple files, as they seem to each take a php-fpm child process, crashing the entire apache website if syncing more than 5-10 files “at once” (need to restart php-fpm to access nextcloud again).

Is this the first time you’ve seen this error? (Y/N): Yes

Steps to replicate it:

Unknown, the problem randomly appeared (no NC configuration change) a few weeks after changing from php 7.4 to php 8.0. Due to the delay, I don’t think this is linked.

The output of your Nextcloud log in Admin > Logging:
Nothing shows up in logs.

The output of your config.php file in /path/to/nextcloud (make sure you remove any identifiable information!):

$CONFIG = array (
  'instanceid' => '[HIDDEN]',
  'passwordsalt' => '[HIDDEN]',
  'secret' => '[HIDDEN]',
  'trusted_domains' =>
  array (
    0 => '[HIDDEN]',
  ),
  'datadirectory' => '/var/www/nextcloud/data',
  'dbtype' => 'mysql',
  'version' => '22.2.0.2',
  'overwrite.cli.url' => '[HIDDEN]',
  'dbname' => '[HIDDEN]',
  'dbhost' => 'localhost',
  'dbport' => '',
  'dbtableprefix' => 'oc_',
  'mysql.utf8mb4' => true,
  'dbuser' => '[HIDDEN]',
  'dbpassword' => '[HIDDEN]',
  'installed' => true,
  'htaccess.RewriteBase' => '/',
  'default_phone_region' => 'FR',
  'memcache.local' => '\\OC\\Memcache\\APCu',
  'memcache.distributed' => '\\OC\\Memcache\\Redis',
  'redis' =>
  array (
    'host' => '/run/redis/redis-server.sock',
    'port' => 0,
    'dbindex' => 0,
    'timeout' => 1.5,
  ),
  'memcache.locking' => '\\OC\\Memcache\\Redis',
  'maintenance' => false,
  'enable_previews' => true,
  'enabledPreviewProviders' =>
  array (
    0 => 'OC\\Preview\\TXT',
    1 => 'OC\\Preview\\MarkDown',
    2 => 'OC\\Preview\\OpenDocument',
    3 => 'OC\\Preview\\PDF',
    4 => 'OC\\Preview\\MSOffice2003',
    5 => 'OC\\Preview\\MSOfficeDoc',
    6 => 'OC\\Preview\\PDF',
    7 => 'OC\\Preview\\Image',
    8 => 'OC\\Preview\\Photoshop',
    9 => 'OC\\Preview\\TIFF',
    10 => 'OC\\Preview\\SVG',
    11 => 'OC\\Preview\\Font',
    12 => 'OC\\Preview\\MP3',
    13 => 'OC\\Preview\\Movie',
    14 => 'OC\\Preview\\MKV',
    15 => 'OC\\Preview\\MP4',
    16 => 'OC\\Preview\\AVI',
  ),
  'theme' => '',
  'loglevel' => 2,
  'mail_smtpmode' => 'smtp',
  'mail_smtpsecure' => 'ssl',
  'mail_sendmailmode' => 'smtp',
  'mail_from_address' => 'nextcloud',
  'mail_domain' => '[HIDDEN]',
  'mail_smtpauthtype' => 'LOGIN',
  'mail_smtpauth' => 1,
  'mail_smtphost' => '[HIDDEN]',
  'mail_smtpport' => '465',
  'mail_smtpname' => '[HIDDEN]',
  'mail_smtppassword' => '[HIDDEN]',
);

The output of your Apache/nginx/system log in /var/log/____:

Access:
[IP HIDDEN] - - [20/Oct/2021:11:21:18 +0200] "PUT /remote.php/dav/uploads/Eidenz/f9acc26c41aff5fc39acc287f169c3e1/0000000004096000-0000000005119999 HTTP/1.1" 201 845 "-" "Mozilla/5.0 (Android) Nextcloud-android/3.17.0"
[IP HIDDEN] - - [20/Oct/2021:11:21:22 +0200] "PUT /remote.php/dav/uploads/Eidenz/f9acc26c41aff5fc39acc287f169c3e1/0000000005120000-0000000006143999 HTTP/1.1" 201 845 "-" "Mozilla/5.0 (Android) Nextcloud-android/3.17.0"
[IP HIDDEN] - - [20/Oct/2021:11:21:25 +0200] "PUT /remote.php/dav/uploads/Eidenz/f9acc26c41aff5fc39acc287f169c3e1/0000000006144000-0000000007167999 HTTP/1.1" 201 845 "-" "Mozilla/5.0 (Android) Nextcloud-android/3.17.0"

Error:
[nothing during upload]

However, I often get these error logs (not at the exact time of upload though, usually a bit before/after):

[Wed Oct 20 10:40:28.488456 2021] [proxy_fcgi:error] [pid 17194] [client [IP HIDDEN]:41740] AH01067: Failed to read FastCGI header
[Wed Oct 20 10:40:28.488474 2021] [proxy_fcgi:error] [pid 17194] (104)Connection reset by peer: [client [IP HIDDEN]:41740] AH01075: Error dispatching request to :
[Wed Oct 20 10:40:28.624395 2021] [proxy:error] [pid 17341] (2)No such file or directory: AH02454: FCGI: attempt to connect to Unix domain socket /run/php/php8.0-fpm.sock (*) failed
[Wed Oct 20 10:40:28.624450 2021] [proxy_fcgi:error] [pid 17341] [client [IP HIDDEN]:63776] AH01079: failed to make connection to backend: httpd-UDS

Tried forcing php 7.4 using php7.4-fpm proxy in apache2 config.

The problem still occurs in this php version.

Perhaps you find a configuration modification here.

Thanks for your answer. However my configuration is not new and has been working for about 6 months.

The problem didn’t occur during a config change. I still checked your link and all that is shown there matches mine.
(btw, it’s quite a simplified tutorial, missing quite some things imo)

Well I really can’t find what’s causing the problem.

Except if anyone got any more ideas, I will be waiting for the next NC release to see if it fixes itself or something.

I’ve got an interesting update on the issue. I just thought of testing with a new user, and it seems that this upload issue is only happening on my main account.

When I create a new user, uploading works perfectly with it.

I have no idea what could be wrong with my personal account though…

Update 22.2.2 did not fix the issue, still hanging after each upload.

I can’t believe that the problem occurs only with individual users.

Perhaps this can help you. Sorry german. Perhaps you must use a translator.
Please check FastCGI / FPM: https://www.php.net/manual/en/install.fpm.php

Unfortunately, this does not help as my FPM installation works perfectly and shows no errors other than the timeouts due to Nextcloud uploads hanging.

It’s hard to believe even for me, but I can ensure you that new users do not have any problem, this is solely linked to my “Eidenz” user.

As I really can’t think of anything to fix it, I temporarily made a new user for my sync clients and just shared my folders with it.

I will likely open a github issue since I do no longer think this is a problem with my setup but rather something in Nextcloud itself.

Did you find any fix? I’m experiencing a smiilar issue where I’m not able to sync some PSD files and .sketch files that are quite big (more than 100mb. I’m using the Nextcloud Desktop app on macOS Monterrey

Sorry, didn’t find any fix other than creating a second account and sharing folders with it.

But your issue doesn’t sound similar at all imo… my problem is not being able to upload anything, no matter the size of the file (can’t even create empty text files).

I suggest you search this forum some more, as a lot of people had problems with big files and found fixes for it.